| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: spec,v 1.1 2018/11/09 06:46:03 rillig Exp $ | | 1 | # $NetBSD: spec,v 1.2 2018/11/09 06:59:20 rillig Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | tmpdir=${TMPDIR:-/tmp}/pkgsrc-env-vars | | 4 | tmpdir=${TMPDIR:-/tmp}/pkgsrc-env-vars |
5 | rm -rf "$tmpdir" | | 5 | rm -rf "$tmpdir" |
6 | mkdir -p "$tmpdir" | | 6 | mkdir -p "$tmpdir" |
7 | | | 7 | |
8 | require_file_has_lines() { # filename line... | | 8 | require_file_has_lines() { # filename line... |
9 | rfhl_expected="$tmpdir/expected" | | 9 | rfhl_expected="$tmpdir/expected" |
10 | rfhl_actual=$1 | | 10 | rfhl_actual=$1 |
11 | shift | | 11 | shift |
12 | | | 12 | |
13 | printf '%s\n' "$@" > "$rfhl_expected" | | 13 | printf '%s\n' "$@" > "$rfhl_expected" |
14 | | | 14 | |
| @@ -24,42 +24,42 @@ require_file_has_lines() { # filename li | | | @@ -24,42 +24,42 @@ require_file_has_lines() { # filename li |
24 | | | 24 | |
25 | | | 25 | |
26 | do_test() { | | 26 | do_test() { |
27 | env REGRESS_TMPDIR="$tmpdir" $TEST_MAKE clean | | 27 | env REGRESS_TMPDIR="$tmpdir" $TEST_MAKE clean |
28 | env REGRESS_TMPDIR="$tmpdir" $TEST_MAKE update | | 28 | env REGRESS_TMPDIR="$tmpdir" $TEST_MAKE update |
29 | } | | 29 | } |
30 | | | 30 | |
31 | check_result() { | | 31 | check_result() { |
32 | | | 32 | |
33 | # In the {pre,do,post}-* targets, only the PKGSRC_MAKE_ENV | | 33 | # In the {pre,do,post}-* targets, only the PKGSRC_MAKE_ENV |
34 | # variables are set. | | 34 | # variables are set. |
35 | # | | 35 | # |
36 | require_file_has_lines "$tmpdir/do-build.vars" \ | | 36 | require_file_has_lines "$tmpdir/do-build.vars" \ |
37 | "PKGSRC_MAKE_ENV_set=yes" | | 37 | "PKGSRC_MAKE_ENV" |
38 | | | 38 | |
39 | # In the configure script of the package, some more variables | | 39 | # In the configure script of the package, some more variables |
40 | # are set. | | 40 | # are set. |
41 | # | | 41 | # |
42 | require_file_has_lines "$tmpdir/configure.vars" \ | | 42 | require_file_has_lines "$tmpdir/configure.vars" \ |
43 | "ALL_ENV_set=yes" \ | | 43 | "ALL_ENV" \ |
44 | "CONFIGURE_ENV_set=yes" \ | | 44 | "CONFIGURE_ENV" \ |
45 | "PKGSRC_MAKE_ENV_set=yes" | | 45 | "PKGSRC_MAKE_ENV" |
46 | | | 46 | |
47 | # In the build phase, when the default do-build commands are | | 47 | # In the build phase, when the default do-build commands are |
48 | # run, the Makefiles from the package have access to these | | 48 | # run, the Makefiles from the package have access to these |
49 | # variables: | | 49 | # variables: |
50 | # | | 50 | # |
51 | require_file_has_lines "$tmpdir/make-all.vars" \ | | 51 | require_file_has_lines "$tmpdir/make-all.vars" \ |
52 | "ALL_ENV_set=yes" \ | | 52 | "ALL_ENV" \ |
53 | "MAKE_ENV_set=yes" \ | | 53 | "MAKE_ENV" \ |
54 | "PKGSRC_MAKE_ENV_set=yes" | | 54 | "PKGSRC_MAKE_ENV" |
55 | | | 55 | |
56 | # In the install phase, when the default do-install commands are | | 56 | # In the install phase, when the default do-install commands are |
57 | # run, the Makefiles from the package have access to these | | 57 | # run, the Makefiles from the package have access to these |
58 | # variables: | | 58 | # variables: |
59 | # | | 59 | # |
60 | require_file_has_lines "$tmpdir/make-install.vars" \ | | 60 | require_file_has_lines "$tmpdir/make-install.vars" \ |
61 | "ALL_ENV_set=yes" \ | | 61 | "ALL_ENV" \ |
62 | "INSTALL_ENV_set=yes" \ | | 62 | "INSTALL_ENV" \ |
63 | "MAKE_ENV_set=yes" \ | | 63 | "MAKE_ENV" \ |
64 | "PKGSRC_MAKE_ENV_set=yes" | | 64 | "PKGSRC_MAKE_ENV" |
65 | } | | 65 | } |