First time contributor, adding p1004 for C++20 -- constexpr std::vector

Jonathan Wakely jwakely@redhat.com
Fri Jul 31 10:24:40 GMT 2020


On 30/07/20 21:42 +0100, Jonathan Wakely wrote:
>On 30/07/20 16:37 -0400, Josh Marshall wrote:
>>Speaking of, adding the libraries in the Ubuntu parts of the system
>>seems to have worked.  How do I run the whole test suite?  There's a
>>lot of reading and I can't parse through it fast enough to be
>>efficient and effective.
>
>Run 'make check' in the libstdc++ build directory, which will be
>something like x86_64-pc-linux-gnu/libstdc++-v3 in the main gcc build
>dir.

You'll need dejagnu installed to run the tests, that's our test
framework.

You can add -j N to the make check command to run in parallel, where a
good value of N is the number of cores you have.

After running that the results are summarised in testsuite/libstdc++.sum
and the full test output (including details of errors) is in
testsuite/libstdc++.log

I use the following Bash functions to examine the results quickly:

sumtest ()
{
     awk '/^(X?PASS|X?FAIL|UN|ERROR)/{counts[$1] += 1} END{ for (i in counts) printf "%-15s %d\n", i, counts[i] }' ${1:-testsuite/libstdc++.sum}
}

fails () 
{ 
     egrep --color=auto '^(FAIL|XPASS|UNRESOLVED|ERROR)' ${1:-testsuite/libstdc++.sum}
}

And I use this to run a subset of tests quickly:

check () 
{ 
     local glob="$1";
     local opts="$2";
     shift 2;
     make check $RTF="$glob${opts:+ --target_board=unix/$opts}" "$@";
     sumtest
}

e.g. to run all the vector tests:

check 23_containers/vector/*

To run all the existing tests in C++20 mode (to verify that your
changes don't break any existing tests when C++20 mode is enabled)
you can specify additional compiler options (separated by slashes) as
the second argument:

check 23_containers/vector/* -std=gnu++2a

The same but with four processes in parallel:

check 23_containers/vector/* -std=gnu++2a -j4



More information about the Libstdc++ mailing list