2 # Copyright (C) 2013 Intel Corporation; author Matt Fleming
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, Inc., 53 Temple Place Ste 330,
7 # Boston MA 02111-1307, USA; either version 2 of the License, or
8 # (at your option) any later version; incorporated herein by reference.
13 # copy-files - copy a config to the mounted filesystem
15 # Copies $(cfg) to the default Syslinux config location.
16 # Usually this wants pairing with a use of $(remove-config).
18 # To use, your config filename must be the same as your target
21 for f in
$($@_files
); do \
22 sudo cp
$$f $(INSTALL_DIR
) ;\
30 define install-config
=
31 sudo sh
-c
'echo INCLUDE $($@_cfg) >> $(CONFIG_FILE)'
36 # remove-files - deletes files from the mounted filesystem
38 # Deletes $(mytest_files)
41 for f in
$($@_files
); do \
42 sudo
rm $(INSTALL_DIR
)/$$f ;\
47 # delete-config - remove a test's config file from the master config
49 define delete-config
=
50 sudo sed
-i
-e
'/INCLUDE $($@_cfg)/d' $(CONFIG_FILE
)
54 # run-test - begin executing the tests
60 sudo
$(QEMU
) $(QEMU_FLAGS
) -serial file
:$@.log
65 sudo
sort $@.log
-o
$@.log
66 if
[ `comm -1 -3 $@.log $($@_results) | wc -l` -ne
0 ]; then \
67 printf
" [!] $@ failed\n" ;\
69 printf
" [+] $@ passed\n" ;\