From f3a434043525a2f3e3a0ae7388c21841f3b01ec7 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 31 Jul 2017 17:16:49 -0700 Subject: [PATCH] Fix test suite zip generation on mac Don't use sed -i, it requires an argument on mac and is eating the -e parameter, which causes the command to not be applied. Also clean up the temporary list files so they don't clutter up $OUT. Test: m -j device-tests Bug: 64226094 Change-Id: Ie71820fc2d1cd812717bf0c156af011ca723e9f6 --- core/tasks/device-tests.mk | 4 ++-- core/tasks/general-tests.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/tasks/device-tests.mk b/core/tasks/device-tests.mk index b1b936af31..d679c594c8 100644 --- a/core/tasks/device-tests.mk +++ b/core/tasks/device-tests.mk @@ -17,11 +17,11 @@ device-tests-zip := $(PRODUCT_OUT)/device-tests.zip $(device-tests-zip): $(COMPATIBILITY.device-tests.FILES) $(SOONG_ZIP) - echo $(sort $(COMPATIBILITY.device-tests.FILES)) > $@.list - sed -i -e 's/\s\+/\n/g' $@.list + echo $(sort $(COMPATIBILITY.device-tests.FILES)) | tr " " "\n" > $@.list grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true $(hide) $(SOONG_ZIP) -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list -P target -C $(PRODUCT_OUT) -l $@-target.list + rm -f $@.list $@-host.list $@-target.list device-tests: $(device-tests-zip) $(call dist-for-goals, device-tests, $(device-tests-zip)) diff --git a/core/tasks/general-tests.mk b/core/tasks/general-tests.mk index 763dd5157f..bf4eb1d201 100644 --- a/core/tasks/general-tests.mk +++ b/core/tasks/general-tests.mk @@ -16,11 +16,11 @@ general-tests-zip := $(PRODUCT_OUT)/general-tests.zip $(general-tests-zip): $(COMPATIBILITY.general-tests.FILES) $(SOONG_ZIP) - echo $(sort $(COMPATIBILITY.general-tests.FILES)) > $@.list - sed -i -e 's/\s\+/\n/g' $@.list + echo $(sort $(COMPATIBILITY.general-tests.FILES)) | tr " " "\n" > $@.list grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true $(hide) $(SOONG_ZIP) -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list -P target -C $(PRODUCT_OUT) -l $@-target.list + rm -f $@.list $@-host.list $@-target.list general-tests: $(general-tests-zip) $(call dist-for-goals, general-tests, $(general-tests-zip))