[banshee] tests: simplify Makefile.am
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] tests: simplify Makefile.am
- Date: Fri, 17 Jan 2014 15:58:15 +0000 (UTC)
commit 0391db04dd45b529dbfe95a18aef24e4293703a3
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Fri Jan 17 16:58:08 2014 +0100
tests: simplify Makefile.am
* There's no need to use 'export' to set variables here.
* Check for the exit code of the current test run can be
less verbose by using the || operator.
tests/Makefile.am | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3f6a12b..52f4d3b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,14 +32,11 @@ endif
ENV_OPTIONS = TZ=America/Chicago LC_ALL=it_IT LANG=it_IT
NUNIT_CONSOLE = $$(echo $$(which nunit-console2 || which nunit-console))
RUNNER = \
- export GLOBAL_EXIT_CODE=0; \
+ GLOBAL_EXIT_CODE=0; \
for asm in $${TEST_ASSEMBLIES}; do \
echo -e "\033[1mRunning tests on $${asm}...\033[0m"; \
- $(ENV_OPTIONS) $(NUNIT_CONSOLE) -nologo -noshadow $$asm; \
- export CURRENT_EXIT_CODE="$$?"; \
- if [[ $${CURRENT_EXIT_CODE} -ne 0 ]]; then \
- export GLOBAL_EXIT_CODE=1; \
- fi; \
+ $(ENV_OPTIONS) $(NUNIT_CONSOLE) -nologo -noshadow $$asm \
+ || GLOBAL_EXIT_CODE=$$?; \
done; \
if [[ $${GLOBAL_EXIT_CODE} -ne 0 ]]; then \
echo "One or more tests failed"; \
@@ -48,14 +45,14 @@ RUNNER = \
test:
@pushd $(DIR_BIN) &>/dev/null; \
- export TEST_ASSEMBLIES="$(TEST_ASSEMBLIES)"; $(RUNNER); \
+ TEST_ASSEMBLIES="$(TEST_ASSEMBLIES)"; $(RUNNER); \
popd &>/dev/null;
%:
@pushd $(DIR_BIN) &>/dev/null; \
for i in *.dll; do \
if [[ $$(echo "$$i" | tr "[:upper:]" "[:lower:]") = "$$(echo "$@" | tr "[:upper:]"
"[:lower:]").dll" ]]; then \
- export TEST_ASSEMBLIES="$$i"; $(RUNNER); \
+ TEST_ASSEMBLIES="$$i"; $(RUNNER); \
fi; \
done;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]