[LNT] r258118 - Revert "[test-suite-cmake] Test --only-test support"
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 03:53:39 PST 2016
Author: jamesm
Date: Tue Jan 19 05:53:39 2016
New Revision: 258118
URL: http://llvm.org/viewvc/llvm-project?rev=258118&view=rev
Log:
Revert "[test-suite-cmake] Test --only-test support"
This reverts r258117. Green dragon isn't happy, and it's either this or r258116...
Modified:
lnt/trunk/lnt/tests/test_suite.py
lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake
lnt/trunk/tests/runtest/test_suite.py
Modified: lnt/trunk/lnt/tests/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/test_suite.py?rev=258118&r1=258117&r2=258118&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Tue Jan 19 05:53:39 2016
@@ -313,23 +313,19 @@ class TestSuiteTest(BuiltinTest):
def _test_threads(self):
return self.opts.threads
- def _check_call(self, *args, **kwargs):
- if self.opts.verbose:
- note('Execute: %s' % ' '.join(args[0]))
- if 'cwd' in kwargs:
- note(' (In %s)' % kwargs['cwd'])
- return subprocess.check_call(*args, **kwargs)
-
+ def _only_test(self):
+ return self.opts.only_test
+
def _clean(self, path):
make_cmd = self.opts.make
subdir = path
- if self.opts.only_test:
- components = [path] + self.opts.only_test.split('/')
+ if self._only_test():
+ components = [path] + self._only_test().split('/')
subdir = os.path.join(*components)
- self._check_call([make_cmd, 'clean'],
- cwd=subdir)
+ subprocess.check_call([make_cmd, 'clean'],
+ cwd=subdir)
def _configure(self, path):
cmake_cmd = self.opts.cmake
@@ -353,22 +349,22 @@ class TestSuiteTest(BuiltinTest):
for l in lines:
note(l)
- self._check_call([cmake_cmd, self._test_suite_dir()] +
- ['-D%s=%s' % (k,v) for k,v in defs.items()],
- cwd=path)
+ subprocess.check_call([cmake_cmd, self._test_suite_dir()] +
+ ['-D%s=%s' % (k,v) for k,v in defs.items()],
+ cwd=path)
def _make(self, path):
make_cmd = self.opts.make
subdir = path
- if self.opts.only_test:
- components = [path] + self.opts.only_test.split('/')
+ if self._only_test():
+ components = [path] + self._only_test().split('/')
subdir = os.path.join(*components)
note('Building...')
- self._check_call([make_cmd,
- '-j', str(self._build_threads())],
- cwd=subdir)
+ subprocess.check_call([make_cmd,
+ '-j', str(self._build_threads())],
+ cwd=subdir)
def _lit(self, path, test):
lit_cmd = self.opts.lit
@@ -380,8 +376,8 @@ class TestSuiteTest(BuiltinTest):
output_json_path.close()
subdir = path
- if self.opts.only_test:
- components = [path] + self.opts.only_test.split('/')
+ if self._only_test():
+ components = [path] + self._only_test().split('/')
subdir = os.path.join(*components)
extra_args = []
@@ -389,11 +385,11 @@ class TestSuiteTest(BuiltinTest):
extra_args = ['--no-execute']
note('Testing...')
- self._check_call([lit_cmd,
- '-sv',
- '-j', str(self._test_threads()),
- subdir,
- '-o', output_json_path.name] + extra_args)
+ subprocess.check_call([lit_cmd,
+ '-sv',
+ '-j', str(self._test_threads()),
+ subdir,
+ '-o', output_json_path.name] + extra_args)
return json.loads(open(output_json_path.name).read())
Modified: lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake?rev=258118&r1=258117&r2=258118&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake (original)
+++ lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake Tue Jan 19 05:53:39 2016
@@ -5,7 +5,5 @@ if [[ ! -f $1/CMakeLists.txt ]]; then
else
cp $1/fake-test $1/fake-results.json .
echo "Dummy" > CMakeCache.txt
- mkdir subtest
- cp $1/fake-test $1/fake-results.json subtest
exit 0
fi
Modified: lnt/trunk/tests/runtest/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/test_suite.py?rev=258118&r1=258117&r2=258118&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/test_suite.py (original)
+++ lnt/trunk/tests/runtest/test_suite.py Tue Jan 19 05:53:39 2016
@@ -199,19 +199,3 @@
# RUN: FileCheck --check-prefix CHECK-RUNUNDER2 < %t.err %s
# CHECK-RUNUNDER2: TEST_SUITE_RUN_UNDER: '{{.*}}/fake-make'
-# Check --only-test
-# RUN: lnt runtest test-suite \
-# RUN: --sandbox %t.SANDBOX \
-# RUN: --no-timestamp \
-# RUN: --test-suite %S/Inputs/test-suite-cmake \
-# RUN: --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
-# RUN: --use-cmake %S/Inputs/test-suite-cmake/fake-cmake \
-# RUN: --use-make %S/Inputs/test-suite-cmake/fake-make \
-# RUN: --use-lit %S/Inputs/test-suite-cmake/fake-lit \
-# RUN: --only-test subtest \
-# RUN: --verbose \
-# RUN: > %t.log 2> %t.err
-# RUN: FileCheck --check-prefix CHECK-ONLYTEST < %t.err %s
-# CHECK-ONLYTEST: Execute: {{.*}}/fake-make -j 1
-# CHECK-ONLYTEST: (In {{.*}}/subtest)
-
More information about the llvm-commits
mailing list