From 9a91c1dd2d4b05779fea5c8cc78daf6cc7416338 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Fri, 15 Feb 2013 17:43:21 -0700 Subject: [PATCH] set remote-test variable based on the presence of remote-test-host or remote-test-port The new way to run a remote test is: make arch= remote-test-host= test --- makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index f760e2a223..d075355c60 100755 --- a/makefile +++ b/makefile @@ -270,8 +270,18 @@ as = $(cc) ld = $(cc) build-ld = $(build-cc) -remote-test-host = localhost -remote-test-port = 22 +default-remote-test-host = localhost +default-remote-test-port = 22 +ifeq ($(remote-test-host),) + remote-test-host = $(default-remote-test-host) +else + remote-test = true +endif +ifeq ($(remote-test-port),) + remote-test-port = $(default-remote-test-port) +else + remote-test = true +endif remote-test-user = ${USER} remote-test-dir = /tmp/avian-test-${USER} @@ -1272,7 +1282,7 @@ test: build $(build)/run-tests.sh $(build)/test.sh $(unittest-executable) ifneq ($(remote-test),true) /bin/sh $(build)/run-tests.sh else - @echo "testing remotely..." + @echo "running tests on $(remote-test-user)@$(remote-test-host):$(remote-test-port), in $(remote-test-dir)" rsync $(build) -rav --exclude '*.o' --rsh="ssh -p$(remote-test-port)" $(remote-test-user)@$(remote-test-host):$(remote-test-dir) ssh -p$(remote-test-port) $(remote-test-user)@$(remote-test-host) sh "$(remote-test-dir)/$(platform)-$(arch)$(options)/run-tests.sh" endif