From: Michal Sojka Date: Sat, 12 Mar 2011 15:12:37 +0000 (+0100) Subject: Partially fix cmetric test for keil16x X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/commitdiff_plain/2cea42fb62d315c14d00bc5fdf7006c74b268482 Partially fix cmetric test for keil16x --- diff --git a/snippets/keil16x.omk b/snippets/keil16x.omk index 61899b3..fd6a6e7 100644 --- a/snippets/keil16x.omk +++ b/snippets/keil16x.omk @@ -142,3 +142,9 @@ $(USER_LIB_DIR)/$(LIB_PREF)$(1)$(LIB_EXT): $$($(1)_OBJS) $(AR) ADD $$$${S// /,} TO $$$$L $(FILTER_KEIL_LIB_OUTPUT) @touch $(USER_LIB_DIR)/timestamp endef + +# Hack: Unfortunately, USER_LIB_DIR is set later and the rule below would not work. +USER_LIB_DIR := $(MAKERULES_DIR)/_compiled/lib + +$(USER_LIB_DIR)/timestamp: + $(Q)touch $@ diff --git a/tests/cmetric b/tests/cmetric index c7d2e66..8049fc7 100755 --- a/tests/cmetric +++ b/tests/cmetric @@ -5,7 +5,9 @@ touch config.omk-default needs_valid_CC -make NM=false && error "cmetric error was not correctly detected" -make || error "compilation error" -cmp correct_cmetric_config.h _compiled/include/test/cmetric_config.h || \ - error "produced file differs" +WVFAIL make NM=false FAILMSG="cmetric error was not correctly detected" +WVPASS make FAILMSG="compilation error" + +eval $(make omk-get-var VAR=COMPILED_DIR_NAME|grep ^COMPILED_DIR_NAME) + +WVPASS diff -u correct_cmetric_config.h $COMPILED_DIR_NAME/include/test/cmetric_config.h diff --git a/tests/wvtest.sh b/tests/wvtest.sh index 0cb7b52..5c11222 100644 --- a/tests/wvtest.sh +++ b/tests/wvtest.sh @@ -144,9 +144,9 @@ omkize() needs_valid_CC() { - CC=$(make -qp|sed -ne '/^CC = / s///p') - if ! [[ -x "$CC" ]]; then - echo "Warning: $CC not found - skipping the test" + CC=$(make omk-get-var VAR=CC|sed -ne '/^CC=/ s///p') + if ! which ${CC%% *} > /dev/null; then + echo "Warning: '$CC' not found - skipping the test" exit 0 fi }