summaryrefslogtreecommitdiffstats
path: root/Tasks/distribution/install/default/Makefile
blob: 1c458f440ba2fb0f2d5cafdb32e0b84a34b217de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Include global Makefile targets
include /usr/share/rhts/lib/rhts-make.include

# Test metadata file
METADATA=testinfo.desc

# The toplevel namespace within which the test lives.
TOPLEVEL_NAMESPACE=/distribution

# The name of the package under test:
PACKAGE_NAME=kernel

# The path of the test below the package:
RELATIVE_PATH=install

# For organization purposes I have moved this test into the 
#  /distribution/install/default directory. But it test namespace
#  will remain /distribution/install 

# Required variables
export TESTVERSION=1.10
export TEST=$(TOPLEVEL_NAMESPACE)/$(RELATIVE_PATH)
TEST_DIR=/mnt/tests$(TEST)
BINFILE=hvm_detect

# Built executables should be added here
BUILT_FILES=$(BINFILE).c
FILES=$(BUILT_FILES) $(METADATA) runtest.sh Makefile

build: $(BUILT_FILES)
ifeq ($(shell arch),x86_64)
	@echo "x86_64 arch, hvm_detect will be built"
	if which gcc; then
		gcc $(BINFILE).c -o ./$(BINFILE)
		chmod a+x ./$(BINFILE)
	fi
endif
	chmod a+x ./runtest.sh

clean:
	rm -rf ./mnt
	rm -f *~ $(BINFILE)
	rm -f rhts-rh-tests-distribution-install*.noarch.rpm
	rm -f rh-tests-distribution-install*.noarch.rpm

run: build
	./runtest.sh

# Generate the testinfo.desc(METADATA) here:
$(METADATA): Makefile
	@touch $(METADATA)
	@echo "Owner:		Bill Peck <bpeck@redhat.com>" > $(METADATA)
	@echo "Name:		$(TEST)"	>> $(METADATA)
	@echo "Path:		$(TEST_DIR)"	>> $(METADATA)
	@echo "TestVersion:	$(TESTVERSION)"	>> $(METADATA)
	@echo "Description:	Reports back on the Installation that was done" >> $(METADATA)
	@echo "TestTime:	20m"		>> $(METADATA)
	@echo "Priority:	Manual"		>> $(METADATA)
	@echo "Requires:	make"		>> $(METADATA)
	@echo "Requires:	gcc"		>> $(METADATA)
	@echo "Requires:	wget"		>> $(METADATA)
	@echo "Requires:	procmail"	>> $(METADATA)
	@echo "Requires:	redhat-lsb"	>> $(METADATA)
	@echo "License:		GPL"		>> $(METADATA)