[libcxx-dev] How to include abi and unwind tests in libcxx test suite in standalone mode

Dominik Montada via libcxx-dev libcxx-dev at lists.llvm.org
Tue Aug 4 02:47:40 PDT 2020


One more thing: manually deleting the standalone check in order to 
generate the check-cxxabi target does not work either. First, 
<build>/bin/llvm-lit is not generated (and trying to copy the relevant 
CMake snippet from the libcxx CMakeLists.txt causes an error) and 
executing check-cxxabi executes something, but then crashes with the 
following error:

lit.py: llvm/utils/lit/lit/TestingConfig.py:101: fatal: unable to parse 
config file 'build/test/lit.site.cfg', traceback: Traceback (most recent 
call last):
   File "llvm/utils/lit/lit/TestingConfig.py", line 88, in load_from_path
     exec(compile(data, path, 'exec'), cfg_globals, None)
   File "build/test/lit.site.cfg", line 153, in <module>
     configuration.configure()
   File "libcxx/utils/libcxx/test/config.py", line 148, in configure
     self.lit_config
   File "libcxx/utils/libcxx/test/newconfig.py", line 22, in configure
     feature.enableIn(config)
   File "libcxx/utils/libcxx/test/dsl.py", line 270, in enableIn
     assert self.isSupported(config), \
   File "libcxx/utils/libcxx/test/dsl.py", line 243, in isSupported
     return self._isSupported(config)
   File "libcxx/utils/libcxx/test/params.py", line 20, in <lambda>
     when=lambda cfg: hasCompileFlag(cfg, '-std={}'.format(std)))),
   File "libcxx/utils/libcxx/test/dsl.py", line 125, in hasCompileFlag
     with _makeConfigTest(config) as test:
   File "libcxx/utils/libcxx/test/dsl.py", line 62, in _makeConfigTest
     prefix=testPrefix)
   File "/usr/lib/python2.7/tempfile.py", line 475, in NamedTemporaryFile
     (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
   File "/usr/lib/python2.7/tempfile.py", line 242, in _mkstemp_inner
     file = _os.path.join(dir, pre + name + suf)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

I remember seeing this error in libcxx when I manually tried to execute 
a test with python2 instead of python3. But I don't see any way to tell 
the test suite to use python3 for the check-cxxabi target.

Am I missing something or is standalone testing of libcxxabi currently 
broken/not supported?

Cheers,

Dominik

Am 04.08.20 um 08:59 schrieb Dominik Montada via libcxx-dev:
> Hi Louis,
>
> sorry for digging up this old thread. I only just got around to start 
> working on this again.
>
> I wanted to set up the libc++abi tests as standalone and I'm getting 
> the following error:
>
> CMake Warning at CMakeLists.txt:480 (message):
>   The libc++abi tests aren't valid when libc++abi is built standalone 
> (i.e.
>   outside of llvm/projects/libcxxabi ) and is built without a shared 
> library.
>   Either build a shared library, build libc++abi at the same time as you
>   build libc++, or do without testing.  No check target will be 
> available!
>
> I'm building in-tree but standalone. Is this intended even with your 
> new patches or a bug?
>
> Cheers,
>
> Dominik
>
> Am 25.06.20 um 18:16 schrieb Louis Dionne:
>> I just landed these patches:
>>
>>      commit c55051eea5d3cd57abfd9727f519b670517704d9
>>      Author: Louis Dionne <ldionne at apple.com>
>>      Date:   Thu Jun 25 12:02:43 2020 -0400
>>
>>          [libunwind] Allow specifying custom Lit config files
>>
>>          This is the libunwind counterpart of 0c66af970c80.
>>
>>      commit 33c9c10d183371edc95fa936705bef56f55ab611
>>      Author: Louis Dionne <ldionne at apple.com>
>>      Date:   Thu Jun 25 11:46:00 2020 -0400
>>
>>          [libc++abi] Allow specifying custom Lit config files
>>
>>          This is the libc++abi counterpart of 0c66af970c80.
>>
>> Louis
>>
>>
>>> On Jun 25, 2020, at 11:28, Louis Dionne via libcxx-dev 
>>> <libcxx-dev at lists.llvm.org> wrote:
>>>
>>>
>>>
>>>> On Jun 25, 2020, at 08:14, Dominik Montada 
>>>> <dominik.montada at hightec-rt.com> wrote:
>>>>
>>>> Hi Louis,
>>>>
>>>> sorry for bothering you once more about the libcxx test suite! I 
>>>> was wondering whether you could help with some of my problems again.
>>>>
>>>> After the recent discussion on the mailing list and your diff, I 
>>>> was able to set up cross-compilation and remote-execution of the 
>>>> libcxx test suite, so thank you for that!
>>> I'm glad to hear that!
>>>
>>>> We have split up the build of the libraries into different stages, 
>>>> so libcxx, libcxxabi and libunwind are all built in standalone 
>>>> mode. If I understand correctly, libcxxabi and libunwind tests are 
>>>> not supported when using this. Is there a way to include those 
>>>> tests when running the libcxx test suite?
>>>>
>>>> If not, what is the recommended way to build and test those 
>>>> libraries when doing cross-compilation?
>>>
>>> Yes, they are supported. It's just that I haven't implemented the 
>>> ability to use a 100% custom site config file for libcxxabi and 
>>> libunwind, but it should work just the same. I'll try doing that 
>>> today -- it should be the same dance as what I did for libcxx.
>>>
>>> Louis
>>>
>>> _______________________________________________
>>> libcxx-dev mailing list
>>> libcxx-dev at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev
>>
>>
>> _______________________________________________
>> libcxx-dev mailing list
>> libcxx-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev

-- 
----------------------------------------------------------------------
Dominik Montada                   Email: dominik.montada at hightec-rt.com
HighTec EDV-Systeme GmbH          Phone: +49 681 92613 19
Europaallee 19                    Fax:   +49-681-92613-26
D-66113 Saarbrücken               WWW: http://www.hightec-rt.com

Managing Director: Vera Strothmann
Register Court: Saarbrücken, HRB 10445, VAT ID: DE 138344222

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient please notify the sender immediately
and destroy this e-mail. Any unauthorised copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20200804/3e965057/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20200804/3e965057/attachment.bin>


More information about the libcxx-dev mailing list