Skip to content

Commit b75ab8f

Browse files
committed
Try to make test more robust
1 parent 14fa5db commit b75ab8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libcxx/test/libcxx/vendor/apple/disable-availability.sh.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
// don't define _LIBCPP_DISABLE_AVAILABILITY. Otherwise, something may have changed in libc++
2828
// and this test might not work anymore.
2929
// RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -shared -o %t.1.dylib
30-
// RUN: nm -omg %t.1.dylib | c++filt | grep value | grep weak
30+
// RUN: nm -m %t.1.dylib | c++filt | grep value > %t.1.symbols
31+
// RUN: grep weak %t.1.symbols
3132

3233
// Now, make sure that 'weak' goes away when we define _LIBCPP_DISABLE_AVAILABILITY.
3334
// In fact, all references to the function might go away, so we just check that we don't emit
3435
// any weak reference.
3536
// RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -D_LIBCPP_DISABLE_AVAILABILITY -shared -o %t.2.dylib
36-
// RUN: nm -omg %t.2.dylib | c++filt | grep -v weak
37+
// RUN: nm -m %t.2.dylib | c++filt | grep value > %t.2.symbols
38+
// RUN: not grep weak %t.2.symbols
3739

3840
#include <version>
3941

0 commit comments

Comments
 (0)