[cfe-dev] [libc++] Running tests from cmake?

OKUMURA Yuki mjt at cltn.org
Thu Sep 22 15:51:04 PDT 2011


Hi list,
I'd tested this myself, but some tests failed with ETXTBSY and
"testit" script is preferred choice for now..
(It seems clang driver problem, but i haven't confirmed it yet.)

To reproduce...:
1) (install https://github.com/okuoku/freebsd-head to get xlocale-ready FBSD)
2) install devel/libunwind
3) install libcxxrt from https://github.com/pathscale/libcxxrt
4) patch libcxx/test/lit.cfg

diff --git a/test/lit.cfg b/test/lit.cfg
index d8023fd..026ea63 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -146,6 +146,9 @@ if sys.platform == 'darwin':
 if sys.platform == 'linux2':
   libraries += ['-lgcc_eh', '-lsupc++', '-lc', '-lm', '-lrt', '-lgcc_s']
   libraries += ['-Wl,-R', libcxx_obj_root + '/lib']
+if sys.platform == 'freebsd8':
+  libraries += ['-lpthread', '-lcxxrt', '-lunwind', '-lc', '-lm', '-lgcc_s']
+  libraries += ['-Wl,-R', libcxx_obj_root + '/lib']

 config.test_format = LibcxxTestFormat(cxx_under_test,
                                       cpp_flags = ['-nostdinc++'] +
compile_flags + include_paths,

5) configure libc++ with: cmake
-DLIT_EXECUTABLE=/PATH/TO/llvm/utils/lit/lit.py
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ /PATH/TO/libcxx
6) gmake && gmake check

You will get errors like following:

UNRESOLVED: libc++ ::
localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
(1980 of 4324)
******************** TEST 'libc++ ::
localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp'
FAILED ********************
Exception during script execution:
Traceback (most recent call last):
  File "/usr/home/oku/repos/llvm/utils/lit/lit/main.py", line 122, in runTest
    self.litConfig)
  File "/home/oku/repos/libcxx/test/lit.cfg", line 86, in execute
    out, err, exitCode = self.execute_command(cmd)
  File "/home/oku/repos/libcxx/test/lit.cfg", line 29, in execute_command
    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.7/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 26] Text file busy

-- oku



More information about the cfe-dev mailing list