[Test] Fix swift_swift_parser feature and use in tests

The macro tests were all using "REQUIRES: OS=macosx" as a proxy for
"have the Swift Swift parser". There was an existing feature for this,
but it was just checking whether the path was passed through. Fix that
to use the same variable as in CMake.

Also remove all extraneous `-I` and `-L` to the host libs in the target
invocations.
This commit is contained in:
Ben Barham
2023-03-03 16:15:07 -08:00
parent c1b08e591e
commit e5a28caa9a
30 changed files with 121 additions and 167 deletions

View File

@@ -56,22 +56,16 @@ macro anonymousTypes(_: () -> String) = #externalMacro(module: "MacroDefinition"
#anonymousTypes { "hello" }
// FIXME: Swift parser is not enabled on Linux CI yet.
// REQUIRES: OS=macosx
// REQUIRES: executable_test
// REQUIRES=shell
// REQUIRES: swift_swift_parser, executable_test, shell
// RUN: %empty-directory(%t)
//##-- Prepare the macro plugin.
// RUN: %host-build-swift -swift-version 5 -I %swift-host-lib-dir -L %swift-host-lib-dir -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/../../Macros/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath
// RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/../../Macros/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath
// RUN: COMPILER_ARGS_WITHOUT_SOURCE=( \
// RUN: -swift-version 5 \
// RUN: -load-plugin-library %t/%target-library-name(MacroDefinition) \
// RUN: -I %swift-host-lib-dir \
// RUN: -module-name MacroUser \
// RUN: )