Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xharness] Automatically generate xharness make dependencies. #8324

Merged
merged 1 commit into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,10 @@ $(TOP)/tools/common/SdkVersions.cs: $(TOP)/tools/common/SdkVersions.cs.in
@$(MAKE) -C $(TOP)/src project-files
@touch $@

xharness/xharness.exe: $(wildcard xharness/*.cs) $(wildcard $(TOP)/tools/bcl-test-importer/BCLTestImporter/*.cs) xharness/xharness.csproj $(TOP)/tools/common/SdkVersions.cs test.config test-system.config .stamp-src-project-files
xharness/xharness.exe: $(xharness_dependencies) test.config test-system.config .stamp-src-project-files
$(Q_GEN) $(SYSTEM_MSBUILD) /restore $(MSBUILD_VERBOSITY_QUIET) xharness/xharness.csproj
xharness/xharness.csproj.inc: export ABSOLUTE_PATHS=1
-include xharness/xharness.csproj.inc

killall:
@killall "iPhone Simulator" >/dev/null 2>&1 || true
Expand Down
1 change: 1 addition & 0 deletions tests/xharness/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
xharness.csproj.inc
tmp-test-dir

6 changes: 4 additions & 2 deletions tools/common/create-makefile-fragment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ for proj in $(sort "$REFERENCES_PATH" | uniq); do
sed -i '' "s@^@$proj_dir/@" "$inputs_path"

# Change to Make syntax. This is horrifically difficult in MSBuild,
# because MSBuild blindly replaces backslashes with forword slashes (i.e.
# because MSBuild blindly replaces backslashes with forward slashes (i.e.
# windows paths to unix paths...)
sed -i '' "s_^\\(.*\\)\$_ \\1 \\\\_" "$inputs_path"

Expand All @@ -103,7 +103,9 @@ echo "${PROJECT}_dependencies = \\" >> "$FRAGMENT_PATH"
sort "${INPUT_PATHS[@]}" | uniq >> "$FRAGMENT_PATH"

# Simplify paths somewhat by removing the current directory
sed -i '' "s@$PROJECT_DIR/@@" "$FRAGMENT_PATH"
if test -z "$ABSOLUTE_PATHS"; then
sed -i '' "s@$PROJECT_DIR/@@" "$FRAGMENT_PATH"
fi

# Cleanup
rm -f "${INPUT_PATHS[@]}"