Use ln(1) rather than cp(1) to set up host /system for testing.
The trouble with cp is that if you're running a command directly (because
you're using gdb, say), you need to make sure you've copied the linker
and shell again if you've done a rebuild that caused a change there.
Change-Id: I312da30c0f92b515967e854e0faba272c961ecc7
diff --git a/tests/Android.mk b/tests/Android.mk
index 13d9038..f30a4a8 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -401,8 +401,8 @@
sudo mkdir -p -m 0777 /system/bin; \
fi
mkdir -p $(TARGET_OUT_DATA)/local/tmp
- cp $(TARGET_OUT_EXECUTABLES)/$(LINKER) /system/bin
- cp $(TARGET_OUT_EXECUTABLES)/sh /system/bin
+ ln -fs `realpath $(TARGET_OUT_EXECUTABLES)/$(LINKER)` /system/bin
+ ln -fs `realpath $(TARGET_OUT_EXECUTABLES)/sh` /system/bin
ANDROID_DATA=$(TARGET_OUT_DATA) \
ANDROID_ROOT=$(TARGET_OUT) \
LD_LIBRARY_PATH=$(TARGET_OUT_SHARED_LIBRARIES) \
@@ -417,8 +417,8 @@
sudo mkdir -p -m 0777 /system/bin; \
fi
mkdir -p $(TARGET_OUT_DATA)/local/tmp
- cp $(TARGET_OUT_EXECUTABLES)/linker /system/bin
- cp $(TARGET_OUT_EXECUTABLES)/sh /system/bin
+ ln -fs `realpath $(TARGET_OUT_EXECUTABLES)/linker` /system/bin
+ ln -fs `realpath $(TARGET_OUT_EXECUTABLES)/sh` /system/bin
ANDROID_DATA=$(TARGET_OUT_DATA) \
ANDROID_ROOT=$(TARGET_OUT) \
LD_LIBRARY_PATH=$(2ND_TARGET_OUT_SHARED_LIBRARIES) \