You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 10:22:56 UTC
svn commit: r1132006 - in /incubator/mesos/trunk/src/tests: Makefile.in
main.cpp
Author: benh
Date: Sun Jun 5 08:22:56 2011
New Revision: 1132006
URL: http://svn.apache.org/viewvc?rev=1132006&view=rev
Log:
Moved alltests to bin/tests
Modified:
incubator/mesos/trunk/src/tests/Makefile.in
incubator/mesos/trunk/src/tests/main.cpp
Modified: incubator/mesos/trunk/src/tests/Makefile.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/Makefile.in?rev=1132006&r1=1132005&r2=1132006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/Makefile.in (original)
+++ incubator/mesos/trunk/src/tests/Makefile.in Sun Jun 5 08:22:56 2011
@@ -88,7 +88,7 @@ TESTS_OBJ = main.o test_master.o test_re
test_configurator.o test_string_utils.o \
test_lxc_isolation.o
-ALLTESTS_EXE = $(BINDIR)/alltests
+ALLTESTS_EXE = $(BINDIR)/tests/alltests
EXTERNAL_SCRIPTS = \
$(BINDIR)/tests/external/LxcIsolation/HoldMoreMemThanRequested.sh \
@@ -106,7 +106,8 @@ EXTERNAL_SCRIPTS = \
# Create rules for building the directories that aren't created
# automagically by configure.
-DIRECTORIES = $(BINDIR)/tests/external/LxcIsolation \
+DIRECTORIES = $(BINDIR)/tests \
+ $(BINDIR)/tests/external/LxcIsolation \
$(BINDIR)/tests/external/SampleFrameworks
@@ -126,12 +127,11 @@ $(EXTERNAL_SCRIPTS): | $(BINDIR)/tests/e
$(EXTERNAL_SCRIPTS): $(BINDIR)/tests/%: @srcdir@/%
cp $< $@
-$(ALLTESTS_EXE): $(TESTS_OBJ)
+$(ALLTESTS_EXE): $(TESTS_OBJ) | $(BINDIR)/tests
$(CXX) $(CXXFLAGS) -o $@ $(TESTS_OBJ) $(SCHED_LIB) $(EXEC_LIB) $(LDFLAGS) $(LIBS)
test: all
- cd $(BINDIR)
- ./alltests
+ $(ALLTESTS_EXE)
all: $(ALLTESTS_EXE) $(EXTERNAL_SCRIPTS)
Modified: incubator/mesos/trunk/src/tests/main.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/main.cpp?rev=1132006&r1=1132005&r2=1132006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/main.cpp (original)
+++ incubator/mesos/trunk/src/tests/main.cpp Sun Jun 5 08:22:56 2011
@@ -20,15 +20,15 @@ using namespace mesos::internal::test;
namespace {
// Get absolute path to Mesos home directory based on where the alltests
-// binary is located (which should be in MESOS_HOME/bin)
+// binary is located (which should be in MESOS_HOME/bin/tests)
string getMesosHome(int argc, char** argv) {
// Copy argv[0] because dirname can modify it
int lengthOfArg0 = strlen(argv[0]);
char* copyOfArg0 = new char[lengthOfArg0 + 1];
strncpy(copyOfArg0, argv[0], lengthOfArg0 + 1);
- // Get its directory, and then the parent of that directory
+ // Get its directory, and then the parent of the parent of that directory
string myDir = string(dirname(copyOfArg0));
- string parentDir = myDir + "/..";
+ string parentDir = myDir + "/../..";
// Get the real name of this parent directory
char path[PATH_MAX];
if (realpath(parentDir.c_str(), path) == 0) {
@@ -44,7 +44,6 @@ int main(int argc, char** argv)
{
// Get absolute path to Mesos home directory based on location of alltests
mesos::internal::test::mesosHome = getMesosHome(argc, argv);
- std::cout << "MESOS_HOME: " << mesosHome << std::endl;
// Clear any MESOS_ environment variables so they don't affect our tests
Configurator::clearMesosEnvironmentVars();