Do not raise errors with diagnostics code after local test in order to let executors of the script propagate the appropriate status-code (#1519)

Propagate the appropriate status-code during failed unit-test runs. (eg.: CI-Runs)
pull/1508/head
benedikt-brandtner-bikemap 2023-03-22 07:56:34 +01:00 zatwierdzone przez GitHub
rodzic 7bdf1ae409
commit d97d86320b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -685,11 +685,13 @@ test-sql: clean refresh-docker-images destroy-db start-db-nowait build/import-te
awk '1{print; fflush()} $$0~".*ERROR" {txt=$$0} END{ if(txt){print "\n*** ERROR detected, aborting:"; print txt; exit(1)} }'
@echo "Test SQL output for Import Test Data"
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && psql.sh < tests/test-post-import.sql'
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && psql.sh < tests/test-post-import.sql' 2>&1 | \
awk -v s="ERROR:" '1{print; fflush()} $$0~s{print "*** ERROR detected, aborting"; exit(1)}'
@echo "Run UPDATE process on test data..."
sed -ir "s/^[#]*\s*DIFF_MODE=.*/DIFF_MODE=true/" .env
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && import-diff'
@echo "Test SQL output for Update Test Data"
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && psql.sh < tests/test-post-update.sql'
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && psql.sh < tests/test-post-update.sql' 2>&1 | \
awk -v s="ERROR:" '1{print; fflush()} $$0~s{print "*** ERROR detected, aborting"; exit(1)}'