56 # and the gnulib-tests don't even run at all. |
56 # and the gnulib-tests don't even run at all. |
57 # Note that the below unexports SHELLOPTS, even for targets |
57 # Note that the below unexports SHELLOPTS, even for targets |
58 # other than "test." |
58 # other than "test." |
59 unexport SHELLOPTS |
59 unexport SHELLOPTS |
60 |
60 |
61 # Test transforms to cut out compile lines |
61 # Test transforms retain only relevant results output. |
62 COMPONENT_TEST_TRANSFORMS += '-e "/^ CC .*/d" ' \ |
62 COMPONENT_TEST_TRANSFORMS += \ |
63 '-e "/^ CCLD .*/d" ' \ |
63 '-n ' \ |
64 '-e "/^ GEN .*/d" ' \ |
64 '-e "/TOTAL/p" ' \ |
65 '-e "/^ AR .*/d" ' |
65 '-e "/SKIP/p" ' \ |
|
66 '-e "/PASS/p" ' \ |
|
67 '-e "/FAIL/p" ' \ |
|
68 '-e "/ERROR/p" ' |
|
69 |
|
70 # Putting GNU on path first prevents some tests from being skipped, |
|
71 # which also keeps the test and system-test results consistent. |
|
72 # With the test target, the path to the just-built commands is |
|
73 # prepended to PATH. With the system-test target, we patch |
|
74 # to prevent the PATH from being prepended. |
|
75 COMPONENT_TEST_ENV += "PATH=$(GNUBIN):$(PATH)" |
|
76 COMPONENT_SYSTEM_TEST_ENV += "PATH=$(GNUBIN):$(PATH)" |
|
77 |
|
78 # Patch to change test path so it tests grep commands from /usr/gnu/bin |
|
79 # installed on the test system. If we patch, we must re-configure the |
|
80 # tests. |
|
81 $(SOURCE_DIR)/.system-test-patched: $(SOURCE_DIR)/.prep |
|
82 $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(COMPONENT_DIR)/system-test-patches/systest.patch |
|
83 $(TOUCH) $(@) |
|
84 |
|
85 # if we previously patched the source for the system-test target, |
|
86 # ensure we rebuild without that patch |
|
87 test-check: |
|
88 if [ -e $(SOURCE_DIR)/.system-test-patched ]; then \ |
|
89 cd $(COMPONENT_DIR); \ |
|
90 $(GMAKE) clean build; \ |
|
91 fi |
66 |
92 |
67 # common targets |
93 # common targets |
68 configure: $(CONFIGURE_64) |
94 configure: $(CONFIGURE_64) |
69 |
95 |
70 build: $(BUILD_64) |
96 build: $(BUILD_64) |
71 |
97 |
72 install: $(INSTALL_64) |
98 install: $(INSTALL_64) |
73 |
99 |
74 test: $(TEST_64) |
100 test: test-check $(TEST_64) |
75 |
101 |
76 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
102 system-test: $(SOURCE_DIR)/.system-test-patched configure $(SYSTEM_TEST_64) |
77 |
103 |
78 |
104 |
79 REQUIRED_PACKAGES += library/pcre |
105 REQUIRED_PACKAGES += library/pcre |
80 REQUIRED_PACKAGES += shell/bash |
106 REQUIRED_PACKAGES += shell/bash |
81 REQUIRED_PACKAGES += system/library |
107 REQUIRED_PACKAGES += system/library |