diff --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp @@ -10,7 +10,7 @@ // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test array::front() raises a debug error. diff --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp @@ -10,7 +10,7 @@ // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test array::front() raises a debug error. diff --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp @@ -10,7 +10,7 @@ // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test array::operator[] raises a debug error. diff --git a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // list(list&& c); diff --git a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++98, c++03 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++98, c++03 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp b/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp --- a/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp @@ -11,7 +11,7 @@ // UNSUPPORTED: libcpp-no-if-constexpr // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test container debugging diff --git a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp --- a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp @@ -11,7 +11,7 @@ // UNSUPPORTED: libcpp-has-no-threads // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test multihtreaded container debugging diff --git a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp --- a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp @@ -11,7 +11,7 @@ // UNSUPPORTED: libcpp-no-if-constexpr // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test container debugging diff --git a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp --- a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp @@ -11,7 +11,7 @@ // UNSUPPORTED: libcpp-no-if-constexpr // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test container debugging diff --git a/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp b/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp --- a/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp @@ -11,7 +11,7 @@ // UNSUPPORTED: libcpp-no-if-constexpr // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // test container debugging diff --git a/libcxx/test/libcxx/debug/debug_abort.pass.cpp b/libcxx/test/libcxx/debug/debug_abort.pass.cpp --- a/libcxx/test/libcxx/debug/debug_abort.pass.cpp +++ b/libcxx/test/libcxx/debug/debug_abort.pass.cpp @@ -9,7 +9,7 @@ // MODULES_DEFINES: _LIBCPP_DEBUG=0 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // Test that the default debug handler aborts the program. diff --git a/libcxx/test/libcxx/debug/debug_helper_test.pass.cpp b/libcxx/test/libcxx/debug/debug_helper_test.pass.cpp --- a/libcxx/test/libcxx/debug/debug_helper_test.pass.cpp +++ b/libcxx/test/libcxx/debug/debug_helper_test.pass.cpp @@ -10,7 +10,7 @@ // UNSUPPORTED: c++98, c++03 // UNSUPPORTED: windows -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // MODULES_DEFINES: _LIBCPP_DEBUG=1 diff --git a/libcxx/test/libcxx/debug/debug_register.pass.cpp b/libcxx/test/libcxx/debug/debug_register.pass.cpp --- a/libcxx/test/libcxx/debug/debug_register.pass.cpp +++ b/libcxx/test/libcxx/debug/debug_register.pass.cpp @@ -9,7 +9,7 @@ // MODULES_DEFINES: _LIBCPP_DEBUG=1 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib #define _LIBCPP_DEBUG 1 diff --git a/libcxx/test/libcxx/iterators/advance.debug1.pass.cpp b/libcxx/test/libcxx/iterators/advance.debug1.pass.cpp --- a/libcxx/test/libcxx/iterators/advance.debug1.pass.cpp +++ b/libcxx/test/libcxx/iterators/advance.debug1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // MODULES_DEFINES: _LIBCPP_DEBUG=1 // UNSUPPORTED: c++98, c++03 // UNSUPPORTED: windows diff --git a/libcxx/test/libcxx/iterators/next.debug1.pass.cpp b/libcxx/test/libcxx/iterators/next.debug1.pass.cpp --- a/libcxx/test/libcxx/iterators/next.debug1.pass.cpp +++ b/libcxx/test/libcxx/iterators/next.debug1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // MODULES_DEFINES: _LIBCPP_DEBUG=1 // UNSUPPORTED: c++98, c++03 // UNSUPPORTED: windows diff --git a/libcxx/test/libcxx/iterators/prev.debug1.pass.cpp b/libcxx/test/libcxx/iterators/prev.debug1.pass.cpp --- a/libcxx/test/libcxx/iterators/prev.debug1.pass.cpp +++ b/libcxx/test/libcxx/iterators/prev.debug1.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // MODULES_DEFINES: _LIBCPP_DEBUG=1 // UNSUPPORTED: with_system_cxx_lib // UNSUPPORTED: c++98, c++03 diff --git a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp --- a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp +++ b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp @@ -12,7 +12,7 @@ // MODULES_DEFINES: _LIBCPP_DEBUG=0 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp --- a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp +++ b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp @@ -12,7 +12,7 @@ // MODULES_DEFINES: _LIBCPP_DEBUG=0 -// Can't test the system lib because this test enables debug mode +// REQUIRES: debug-mode // UNSUPPORTED: with_system_cxx_lib // diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -879,6 +879,8 @@ if debug_level not in ['0', '1']: self.lit_config.fatal('Invalid value for debug_level "%s".' % debug_level) + elif debug_level == '1': + self.config.available_features.add('debug-mode') self.cxx.compile_flags += ['-D_LIBCPP_DEBUG=%s' % debug_level] def configure_warnings(self):