-
Notifications
You must be signed in to change notification settings - Fork 414
Expand file tree
/
Copy pathtravis.mak.in
More file actions
73 lines (55 loc) · 1.61 KB
/
Copy pathtravis.mak.in
File metadata and controls
73 lines (55 loc) · 1.61 KB
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
65
66
67
68
69
70
71
72
73
# -*- makefile -*-
# SPDX-License-Identifier: BSD-2-Clause
#
# Makefile wrapper to parallelize running travis
#
# Run from the main Makefile with "make travis"
# This Makefile, unlike the main one, assumes GNU make or equivalent
#
srcdir = @srcdir@
objdir = @builddir@
VPATH = @srcdir@
PYTHON3 = @PYTHON3@
GREP = grep
tools = $(srcdir)/tools
PERL = perl
PERLFLAGS = -I$(srcdir)/perllib
RUNPERL = $(PERL) $(PERLFLAGS)
NASM = $(objdir)/nasm$(X)
PERL = perl
RUNPERL = $(PERL)
PYTHON3 = @PYTHON3@
GREP = grep
travistools = $(tools)/travis
TRAVIS = $(travistools)/nasm-t.py
testdir = travis
tests := $(shell $(RUNPERL) $(travistools)/findtests.pl $(srcdir) $(objdir) $(testdir))
logs = $(tests:.json=.log)
all: travis.log
@ ! $(GREP) FAIL travis.log && echo '=== All tests PASS ==='
.PRECIOUS: travis.log
travis.log: $(logs)
@cat $(logs) > travis.log
.PRECIOUS: %.log
%.log: $(NASM) %.json
@echo 'Running: $(@D)'
@$(PYTHON3) $(TRAVIS) -d $(srcdir)/$(@D) \
--nasm $(NASM) run --stop=n > $@
.PHONY: update
update: $(tests:.json=.update)
.PHONY: %.update
%.update:
@echo 'Updating: $(@D)'
@$(PYTHON3) $(TRAVIS) -d $(srcdir)/$(@D) --nasm $(NASM) update
#
# Generated files needed for some specific tests
# (If this ends up being a longer list, consider making subdirectory-
# specific Makefiles).
#
GENFILES = $(testdir)/_version/_version.stdout
$(testdir)/_version/_version.stdout: version
printf 'NASM version %s compiled on ?\n' `cat version` > $@
$(testdir)/_version/_version.log: $(testdir)/_version/_version.stdout
# XXX: need to clean up build artifacts, too
clean:
rm -f travis.log $(logs)