[libc++] Avoid duplicating logic in the libcxx-specific filesystem local lit config
authorLouis Dionne <ldionne@apple.com>
Mon, 30 Mar 2020 15:22:04 +0000 (11:22 -0400)
committerLouis Dionne <ldionne@apple.com>
Mon, 30 Mar 2020 15:23:19 +0000 (11:23 -0400)
This will become more relevant as we shift more filesystem-specific
logic to the local lit configuration in test/std/input.output/filesystems.

libcxx/test/libcxx/input.output/filesystems/lit.local.cfg

index 132b73c..4eadb33 100644 (file)
@@ -1,5 +1,4 @@
-# Disable all of the filesystem tests if the dylib under test doesn't support them.
-if 'dylib-has-no-filesystem' in config.available_features:
-  config.unsupported = True
-if 'c++filesystem-disabled' in config.available_features:
-  config.unsupported = True
+# Load the same local configuration as the filesystem tests in libcxx/test/std
+import os
+std_filesystem_tests = os.path.join(config.test_source_root, 'std', 'input.output', 'filesystems')
+config.load_from_path(os.path.join(std_filesystem_tests, 'lit.local.cfg'), lit_config)