From 183fdcbdef04318e53dd84a44398121334269f7a Mon Sep 17 00:00:00 2001 From: Norihiro NAKAOKA Date: Mon, 5 Apr 2021 07:28:20 +0900 Subject: [PATCH] fix: support for missing files in the results or results directory (#1206) * fix: support for missing files in the results or results directory * fix: support for missing files in the results or results directory --- GNUmakefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index 174540d5..0dd3e4c7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -99,7 +99,9 @@ diff: # ln -s oldvuls vuls.old # make int # (ex. test 10 times: for i in `seq 10`; do make int ARGS=-quiet ; done) +ifneq ($(shell ls -U1 ${BASE_DIR} | wc -l), 0) mv ${BASE_DIR}/* /tmp +endif mkdir -p ${NOW_JSON_DIR} cp integration/data/*.json ${NOW_JSON_DIR} ./vuls.old report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-config.toml $(ARGS) @@ -122,7 +124,9 @@ diff-redis: # ln -s vuls vuls.new # ln -s oldvuls vuls.old # make int-redis +ifneq ($(shell ls -U1 ${BASE_DIR} | wc -l), 0) mv ${BASE_DIR}/* /tmp +endif mkdir -p ${NOW_JSON_DIR} cp integration/data/*.json ${NOW_JSON_DIR} ./vuls.old report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-redis-config.toml @@ -135,7 +139,9 @@ diff-redis: echo "old: ${NOW_JSON_DIR} , new: ${ONE_SEC_AFTER_JSON_DIR}" diff-rdb-redis: +ifneq ($(shell ls -U1 ${BASE_DIR} | wc -l), 0) mv ${BASE_DIR}/* /tmp +endif mkdir -p ${NOW_JSON_DIR} cp integration/data/*.json ${NOW_JSON_DIR} ./vuls.new report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-config.toml