From 76b5c1c9ca27e36f72c469234ef0aad143e55f32 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Fri, 22 Mar 2019 15:15:12 -0700 Subject: [PATCH 1/2] Change xxxdb to db-xxx. Makes it work better with tab completion, type db- Groups the db related commands together. Signed-off-by: Tim 'mithro' Ansell --- .github/kokoro/db-full.sh | 4 ++-- Makefile | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/kokoro/db-full.sh b/.github/kokoro/db-full.sh index e6475c20..152e8f2f 100755 --- a/.github/kokoro/db-full.sh +++ b/.github/kokoro/db-full.sh @@ -77,7 +77,7 @@ echo "----------------------------------------" # Check the database #make checkdb-${XRAY_SETTINGS} || true # Format the database -make formatdb-${XRAY_SETTINGS} +make db-format-${XRAY_SETTINGS} # Output if the database has differences echo @@ -139,7 +139,7 @@ echo "----------------------------------------" echo "----------------------------------------" # Check the database and fail if it is broken. -make checkdb-${XRAY_SETTINGS} +make db-check-${XRAY_SETTINGS} # If we get here, then all the fuzzers completed fine. Hence we are # going to assume we don't want to keep all the build / logs / etc (as diff --git a/Makefile b/Makefile index 875132ab..4c4a269a 100644 --- a/Makefile +++ b/Makefile @@ -79,36 +79,36 @@ define database # $(1) - Database name -checkdb-$(1): +db-check-$(1): @echo @echo "Checking $(1) database" @echo "============================" - @$(IN_ENV) python3 utils/checkdb.py --db-root database/$(1) + @$(IN_ENV) python3 utils/db-check.py --db-root database/$(1) -formatdb-$(1): +db-format-$(1): @echo @echo "Formatting $(1) database" @echo "============================" @$(IN_ENV) cd database/$(1); python3 ../../utils/sort_db.py @if [ -e database/Info.md ]; then $(IN_ENV) ./utils/info_md.py --keep; fi -.PHONY: checkdb-$(1) formatdb-$(1) -.NOTPARALLEL: checkdb-$(1) formatdb-$(1) +.PHONY: db-check-$(1) db-format-$(1) +.NOTPARALLEL: db-check-$(1) db-format-$(1) -checkdb: checkdb-$(1) -formatdb: formatdb-$(1) +db-check: db-check-$(1) +db-format: db-format-$(1) endef $(foreach DB,$(DATABASES),$(eval $(call database,$(DB)))) -checkdb: +db-check: @true -formatdb: +db-format: @true -.PHONY: checkdb formatdb +.PHONY: db-check db-format clean: $(MAKE) -C database clean From 822b1af81d2c9f5ea7ca296a14c71dfcb2c88981 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Fri, 22 Mar 2019 15:16:25 -0700 Subject: [PATCH 2/2] Update the info.md on Kokoro. Signed-off-by: Tim 'mithro' Ansell --- .github/kokoro/db-full.sh | 2 ++ Makefile | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/kokoro/db-full.sh b/.github/kokoro/db-full.sh index 152e8f2f..428d0a2d 100755 --- a/.github/kokoro/db-full.sh +++ b/.github/kokoro/db-full.sh @@ -78,6 +78,8 @@ echo "----------------------------------------" #make checkdb-${XRAY_SETTINGS} || true # Format the database make db-format-${XRAY_SETTINGS} +# Update the database/Info.md file +make db-info # Output if the database has differences echo diff --git a/Makefile b/Makefile index 4c4a269a..1b004832 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,9 @@ db-check: db-format: @true +db-info: + $(IN_ENV) ./utils/info_md.py + .PHONY: db-check db-format clean: