blob: a48a18c51adef33b7b3ec40c1966eb2cf444ae0c [file] [log] [blame]
Daniel Lezcanobeaf7942011-09-22 16:19:39 +02001#
Daniel Lezcano35fb1722011-10-03 13:56:11 +02002# PM-QA validation test suite for the power management on Linux
Daniel Lezcanobeaf7942011-09-22 16:19:39 +02003#
4# Copyright (C) 2011, Linaro Limited.
5#
6# This program is free software; you can redistribute it and/or
7# modify it under the terms of the GNU General Public License
8# as published by the Free Software Foundation; either version 2
9# of the License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19#
20# Contributors:
21# Daniel Lezcano <daniel.lezcano@linaro.org> (IBM Corporation)
22# - initial API and implementation
23#
24
25TST=$(wildcard *.sh)
26LOG=$(TST:.sh=.log)
Daniel Lezcano3dd53ee2012-04-05 14:03:08 +020027CFLAGS?=-g -Wall
28CC?=gcc
29SRC=$(wildcard *.c)
30EXEC=$(SRC:%.c=%)
Daniel Lezcanobeaf7942011-09-22 16:19:39 +020031
Daniel Lezcano3dd53ee2012-04-05 14:03:08 +020032check: uncheck $(EXEC) $(LOG)
Daniel Lezcanobeaf7942011-09-22 16:19:39 +020033
34%.log: %.sh
35 @echo "###"
36 @echo "### $(<:.sh=):"
37 @echo -n "### "; cat $(<:.sh=.txt);
38 @echo -n "### "; grep "URL :" ./$< | awk '/http/{print $$NF}'
39 @echo "###"
40 @./$< 2> $@
41
42clean:
Daniel Lezcano3dd53ee2012-04-05 14:03:08 +020043 rm -f *.o $(EXEC)
Daniel Lezcanobeaf7942011-09-22 16:19:39 +020044
Daniel Lezcano3dd53ee2012-04-05 14:03:08 +020045uncheck:
46 -@test ! -z "$(LOG)" && rm -f $(LOG)
Daniel Lezcanobeaf7942011-09-22 16:19:39 +020047
48recheck: uncheck check