Changeset 137 for trunk/Platforms/Test
- Timestamp:
- Feb 16, 2010, 1:35:48 PM (15 years ago)
- Location:
- trunk/Platforms/Test
- Files:
-
- 58 added
- 8 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platforms/Test/Makefile
r136 r137 52 52 PATH_BIN = $(MORPHEO_PREFIX)/bin 53 53 PATH_LOG = $(MORPHEO_TMP)/log 54 PATH_GMON = $(MORPHEO_TMP)/gmon 54 55 PATH_DATA = ./data 55 56 PATH_LOGS = $(patsubst $(PATH_DATA)/%,$(PATH_LOG)/%,$(wildcard $(PATH_DATA)/*)) … … 193 194 194 195 195 $(PATH_LOG)/%.log : $(PATH_DATA)/%.cfg $(EXEC) $(PATH_LOGS) 196 $(PATH_LOG)/%.log : $(PATH_DATA)/%.cfg $(EXEC) $(PATH_LOGS) $(PATH_GMON) 196 197 @\ 197 198 file=$$($(BASENAME) $<); \ … … 199 200 log=$@; \ 200 201 $(ECHO) "Run : $*"; \ 201 $(EXEC_PREFIX) $(EXEC) $(EXEC_PARAMS) $${data} &> $$log; \ 202 \ 203 file_gmon=$$($(BASENAME) $*); \ 204 dir_gmon=$$($(DIRNAME) $*); \ 205 $(MKDIR) $(PATH_GMON)/$$dir_gmon; \ 206 export GMON_OUT_PREFIX=$(PATH_GMON)/$$dir_gmon/$$file_gmon;\ 207 \ 208 $(EXEC_PREFIX) $(EXEC) $(EXEC_PARAMS) $${data} &> $$log;\ 202 209 $(GREP) -q "Test OK" $$log; \ 203 210 declare -i test_ok=$$?; \ … … 233 240 $(CXX) $(PLATFORMS_CXX_FLAGS) -c -o $@ $<; 234 241 235 $(PATH_OBJ) $(PATH_BIN) $(PATH_LOGS) :242 $(PATH_OBJ) $(PATH_BIN) $(PATH_LOGS) $(PATH_GMON) : 236 243 @\ 237 244 $(ECHO) "Create directory : $@";\ … … 243 250 @\ 244 251 $(ECHO) "Delete temporary files in directory $(PWD)";\ 245 $(RM) $(OBJECTS) $(EXEC) $(LOGS) \ 246 *~ $(PATH_SRC)/*~ $(PATH_INC)/*~ $(PATH_DATA)/*/*~ *.res *.txt\ 252 $(RM) $(OBJECTS);\ 253 $(RM) $(EXEC);\ 254 $(RM) $(PATH_LOGS); \ 255 $(RM) $(PATH_GMON); \ 256 $(RM) *~ $(PATH_SRC)/*~ $(PATH_INC)/*~ $(PATH_DATA)/*/*~ *.res *.txt\ 247 257 *core* \ 248 258 tty* \ … … 257 267 $(ECHO) "Delete generated files in directory $(PWD)";\ 258 268 $(RM) $(PATH_OBJ) $(PATH_BIN) $(PATH_LOG) $(SCRIPT);\ 259 $(MAKE) --directory=$(PATH_SOFT) 269 $(MAKE) --directory=$(PATH_SOFT) --makefile=Makefile clean_all; \ 260 270 $(MAKE) --directory=$(ENVIRONMENT_DIR) --makefile=Makefile clean_all; \ 261 271 $(MAKE) --directory=$(MORPHEO_DIR) --makefile=Makefile clean_all; -
trunk/Platforms/Test/script/copy_test.sh
r117 r137 7 7 } 8 8 9 if test ${#} -eq 2; then 10 name_src=${1}; 11 name_dest=${2}; 12 elif test ${#} -eq 1; then 13 name_src="x1_w1_0"; 14 name_dest=${1}; 15 else 16 usage ${*}; 17 fi; 9 function copy_test () 10 { 11 # Test usage 12 if test ${#} -eq 2; then 13 name_src=${1}; 14 name_dest=${2}; 15 elif test ${#} -eq 1; then 16 name_src="x1_w1_0"; 17 name_dest=${1}; 18 else 19 usage ${*}; 20 fi; 21 22 # Test directory source 23 if test ! -d ${name_src}; then 24 echo "${name_src} is an invalid directory"; 25 exit; 26 fi; 27 28 # Test directoru dest : if don't exist, create it 29 if test ! -d ${name_dest}; then 30 mkdir ${name_dest}; 31 fi; 32 33 # Copy and sed 34 for i in ${name_src}/*; do 35 sed s/Instance_${name_src}/Instance_${name_dest}/ ${i} > tmp; 36 mv tmp ${name_dest}/$(basename ${i}); 37 done 38 } 18 39 19 if test ! -d ${name_src}; then 20 echo "${name_src} is an invalid directory"; 21 exit; 22 fi; 23 24 if test ! -d ${name_dest}; then 25 mkdir ${name_dest}; 26 fi; 27 28 for i in ${name_src}/*; do 29 sed s/Instance_${name_src}/Instance_${name_dest}/ ${i} > tmp; 30 mv tmp ${name_dest}/$(basename ${i}); 31 done 40 copy_test ${*} -
trunk/Platforms/Test/script/script1.sh
r136 r137 1 2 3 1 prefix=$2; 4 2 suffix=$1;
Note: See TracChangeset
for help on using the changeset viewer.