pgbackrest.git / summary / log / commit / refs

commit    c625f05a13e0238bf06feb26d0d8757dd2bedffd
Author:   David Steele <david@pgmasters.net>
Date:     Wed Jul 20 21:45:39 2022 +0000

    Unify code builder binaries into a single binary.
    
    Creating new binaries was convenient at first but has now become a maintenance issue.
    
    Solve this by combining that into a single binary that takes an additional parameter to indicate which code should be built.
    
    Also clean up path handling to make it easier to build code from the command line.


src/.gitignore | 2 +- src/Makefile.in | 76 +++++++++-------------------------- src/build/common/render.h | 2 +- src/build/config/main.c | 63 ----------------------------- src/build/error/main.c | 44 --------------------- src/build/help/render.c | 2 +- }/main.c | 51 +++++++++++++++++------- src/build/postgres/main.c | 50 ----------------------- src/build/postgres/render.c | 2 +- src/command/help/meson.build | 5 ++- src/common/error.auto.c.inc | 2 +- src/common/error.auto.h | 2 +- src/config/config.auto.h | 2 +- src/config/parse.auto.c.inc | 2 +- src/meson.build | 77 +++++------------------------------- src/postgres/meson.build | 5 ++- test/src/command/help/meson.build | 3 +- test/src/config/meson.build | 3 +- test/src/module/build/configTest.c | 4 +- test/src/module/build/errorTest.c | 4 +- test/src/module/build/helpTest.c | 2 +- test/src/module/build/postgresTest.c | 4 +- test/test.pl | 8 ++-- 23 files changed, 93 insertions(+), 322 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index 4bfb41951..4f8bdf60b 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -7,4 +7,4 @@ autom4te.cache /build.auto.h /pgbackrest /postgres/interface.auto.c.inc -/build-* +/build-code diff --git a/src/Makefile.in b/src/Makefile.in index f425701b1..3ce3db545 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -5,7 +5,7 @@ #################################################################################################################################### # List of required source files. main.c should always be listed last and the rest in alpha order. #################################################################################################################################### -SRCS_BUILD = \ +SRCS_COMMON = \ common/compress/bz2/common.c \ common/compress/bz2/compress.c \ common/debug.c \ @@ -201,79 +201,39 @@ BUILDDIR=.build #################################################################################################################################### # Compile and link pgbackrest #################################################################################################################################### -OBJS_PGBACKREST = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_BUILD) $(SRCS_PGBACKREST) $(SRCS) main.c) +OBJS_PGBACKREST = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_COMMON) $(SRCS) main.c) pgbackrest: $(OBJS_PGBACKREST) $(CC) -o pgbackrest $(OBJS_PGBACKREST) $(LDFLAGS) $(LIBS) #################################################################################################################################### -# Compile and link config generator +# Compile and link code builder #################################################################################################################################### -SRCS_BUILD_CONFIG = \ +SRCS_BUILD_CODE = \ build/common/render.c \ build/common/yaml.c \ - build/config/main.c \ build/config/parse.c \ - build/config/render.c - -OBJS_BUILD_CONFIG = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_BUILD) $(SRCS_BUILD_CONFIG)) - -build-config: $(OBJS_BUILD_CONFIG) build/config/config.yaml config/config.auto.h config/parse.auto.c.inc - $(CC) -o build-config $(OBJS_BUILD_CONFIG) $(LDFLAGS) $(LIBS) $(LIBS_BUILD) - ./build-config $(VPATH) - -#################################################################################################################################### -# Compile and link error generator -#################################################################################################################################### -SRCS_BUILD_ERROR = \ - build/common/render.c \ - build/common/yaml.c \ - build/error/main.c \ + build/config/render.c \ build/error/parse.c \ - build/error/render.c - -OBJS_BUILD_ERROR = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_BUILD) $(SRCS_BUILD_ERROR)) - -build-error: $(OBJS_BUILD_ERROR) build/error/error.yaml - $(CC) -o build-error $(OBJS_BUILD_ERROR) $(LDFLAGS) $(LIBS) $(LIBS_BUILD) - ./build-error $(VPATH) - -#################################################################################################################################### -# Compile and link help generator -#################################################################################################################################### -SRCS_BUILD_HELP = \ - build/common/render.c \ - build/common/yaml.c \ - build/config/parse.c \ + build/error/render.c \ build/help/parse.c \ build/help/render.c \ - build/help/main.c - -OBJS_BUILD_HELP = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_BUILD) $(SRCS_BUILD_HELP)) - -build-help: $(OBJS_BUILD_HELP) build/config/config.yaml build/help/help.xml - $(CC) -o build-help $(OBJS_BUILD_HELP) $(LDFLAGS) $(LIBS) $(LIBS_BUILD) - -command/help/help.auto.c.inc: build-help - ./build-help $(VPATH) - -#################################################################################################################################### -# Compile and link postgres interface generator -#################################################################################################################################### -SRCS_BUILD_POSTGRES = \ - build/common/render.c \ - build/common/yaml.c \ build/postgres/parse.c \ build/postgres/render.c \ - build/postgres/main.c + build/main.c + +OBJS_BUILD_CODE = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_COMMON) $(SRCS_BUILD_CODE)) -OBJS_BUILD_POSTGRES = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_BUILD) $(SRCS_BUILD_POSTGRES)) +build-code: $(OBJS_BUILD_CODE) build/postgres/postgres.yaml build/config/config.yaml build/help/help.xml + $(CC) -o build-code $(OBJS_BUILD_CODE) $(LDFLAGS) $(LIBS) $(LIBS_BUILD) -build-postgres: $(OBJS_BUILD_POSTGRES) build/postgres/postgres.yaml - $(CC) -o build-postgres $(OBJS_BUILD_POSTGRES) $(LDFLAGS) $(LIBS) $(LIBS_BUILD) +# Build help.auto.c.inc +command/help/help.auto.c.inc: build-code + ./build-code help $(VPATH) -postgres/interface.auto.c.inc: build-postgres - ./build-postgres $(VPATH) +# Build interface.auto.c.inc +postgres/interface.auto.c.inc: build-code + ./build-code postgres $(VPATH) #################################################################################################################################### # Installation. DESTDIR can be used to modify the install location. @@ -296,7 +256,7 @@ uninstall: # Clean build files and executable created by make clean: rm -rf $(BUILDDIR) - rm -f pgbackrest build-config build-error build-help build-postgres command/help/help.auto.c.inc postgres/interface.auto.c.inc + rm -f pgbackrest build-code command/help/help.auto.c.inc postgres/interface.auto.c.inc .PHONY = clean-all diff --git a/src/build/common/render.h b/src/build/common/render.h index d597d5e0f..aaed622c8 100644 --- a/src/build/common/render.h +++ b/src/build/common/render.h @@ -46,7 +46,7 @@ bldHeader(const char *const module, const char *const description) COMMENT_BLOCK_BEGIN "\n" "%s\n" "\n" - "Automatically generated by 'make build-%s' -- do not modify directly.\n" + "Automatically generated by 'build-code %s' -- do not modify directly.\n" COMMENT_BLOCK_END "\n", description, module); } diff --git a/src/build/config/main.c b/src/build/config/main.c deleted file mode 100644 index 1cb5ca3cd..000000000 --- a/src/build/config/main.c +++ /dev/null @@ -1,63 +0,0 @@ -/*********************************************************************************************************************************** -Auto-Generate Command and Option Configuration Enums, Constants and Data -***********************************************************************************************************************************/ -#include "build.auto.h" - -#include <unistd.h> - -#include "common/log.h" -#include "storage/posix/storage.h" - -#include "build/config/parse.h" -#include "build/config/render.h" - -int -main(int argListSize, const char *argList[]) -{ - // Check parameters - CHECK(ParamInvalidError, argListSize <= 3, "only two parameters allowed"); - - // Initialize logging - logInit(logLevelWarn, logLevelError, logLevelOff, false, 0, 1, false); - - // Get current working dir - char currentWorkDir[1024]; - THROW_ON_SYS_ERROR(getcwd(currentWorkDir, sizeof(currentWorkDir)) == NULL, FormatError, "unable to get cwd"); - - // If the repo path was specified - const String *pathRepo = strPath(STR(currentWorkDir)); - String *const pathOut = strCatZ(strNew(), currentWorkDir); - - if (argListSize >= 2) - { - const String *const pathArg = STR(argList[1]); - - if (strBeginsWith(pathArg, FSLASH_STR)) - pathRepo = strPath(pathArg); - else - { - pathRepo = strPathAbsolute(pathArg, STR(currentWorkDir)); - strCatZ(pathOut, "/src"); - } - } - - // If the build path was specified - const String *pathBuild = pathRepo; - - if (argListSize >= 3) - { - const String *const pathArg = STR(argList[2]); - - if (strBeginsWith(pathArg, FSLASH_STR)) - pathBuild = strPath(pathArg); - else - pathBuild = strPathAbsolute(pathArg, STR(currentWorkDir)); - } - - // Render config - const Storage *const storageRepo = storagePosixNewP(pathRepo); - const Storage *const storageBuild = storagePosixNewP(pathBuild, .write = true); - bldCfgRender(storageBuild, bldCfgParse(storageRepo), true); - - return 0; -} diff --git a/src/build/error/main.c b/src/build/error/main.c deleted file mode 100644 index c83fac8af..000000000 --- a/src/build/error/main.c +++ /dev/null @@ -1,44 +0,0 @@ -/*********************************************************************************************************************************** -Auto-Generate Errors -***********************************************************************************************************************************/ -#include "build.auto.h" - -#include <unistd.h> - -#include "common/log.h" -#include "storage/posix/storage.h" - -#include "build/error/parse.h" -#include "build/error/render.h" - -int -main(int argListSize, const char *argList[]) -{ - // Check parameters - CHECK(ParamInvalidError, argListSize <= 2, "only one parameter allowed"); - - // Initialize logging - logInit(logLevelWarn, logLevelError, logLevelOff, false, 0, 1, false); - - // If the path was specified - const String *pathRepo; - - if (argListSize >= 2) - { - pathRepo = strPath(STR(argList[1])); - } - // Else use current working directory - else - { - char currentWorkDir[1024]; - THROW_ON_SYS_ERROR(getcwd(currentWorkDir, sizeof(currentWorkDir)) == NULL, FormatError, "unable to get cwd"); - - pathRepo = strPath(STR(currentWorkDir)); - } - - // Render error - const Storage *const storageRepo = storagePosixNewP(pathRepo, .write = true); - bldErrRender(storageRepo, bldErrParse(storageRepo)); - - return 0; -} diff --git a/src/build/help/render.c b/src/build/help/render.c index f95b12fe8..3e7377157 100644 --- a/src/build/help/render.c +++ b/src/build/help/render.c @@ -325,7 +325,7 @@ bldHlpRenderHelpAutoC(const Storage *const storageRepo, const BldCfg bldCfg, con strCatZ(help, "\n};\n"); // Write to storage - bldPut(storageRepo, "command/help/help.auto.c.inc", BUFSTR(help)); + bldPut(storageRepo, "src/command/help/help.auto.c.inc", BUFSTR(help)); } /**********************************************************************************************************************************/ diff --git a/src/build/help/main.c b/src/build/main.c similarity index 56% rename from src/build/help/main.c rename to src/build/main.c index 38c38273b..e57838250 100644 --- a/src/build/help/main.c +++ b/src/build/main.c @@ -1,5 +1,5 @@ /*********************************************************************************************************************************** -Auto-Generate Help +Code Builder ***********************************************************************************************************************************/ #include "build.auto.h" @@ -9,14 +9,19 @@ Auto-Generate Help #include "storage/posix/storage.h" #include "build/config/parse.h" +#include "build/config/render.h" +#include "build/error/parse.h" +#include "build/error/render.h" #include "build/help/parse.h" #include "build/help/render.h" +#include "build/postgres/parse.h" +#include "build/postgres/render.h" int -main(int argListSize, const char *argList[]) +main(const int argListSize, const char *const argList[]) { // Check parameters - CHECK(ParamInvalidError, argListSize <= 3, "only two parameters allowed"); + CHECK(ParamInvalidError, argListSize >= 2 && argListSize <= 4, "only one to three parameters allowed"); // Initialize logging logInit(logLevelWarn, logLevelError, logLevelOff, false, 0, 1, false); @@ -27,37 +32,53 @@ main(int argListSize, const char *argList[]) // Get repo path (cwd if it was not passed) const String *pathRepo = strPath(STR(currentWorkDir)); - String *pathBuild = strCatZ(strNew(), currentWorkDir); + String *pathBuild = strCat(strNew(), pathRepo); - if (argListSize >= 2) + if (argListSize >= 3) { - const String *const pathArg = STR(argList[1]); + const String *const pathArg = STR(argList[2]); if (strBeginsWith(pathArg, FSLASH_STR)) pathRepo = strPath(pathArg); else - { pathRepo = strPathAbsolute(pathArg, STR(currentWorkDir)); - strCatZ(pathBuild, "/src"); - } + + pathBuild = strDup(pathRepo); } // If the build path was specified - if (argListSize >= 3) + if (argListSize >= 4) { - const String *const pathArg = STR(argList[2]); + const String *const pathArg = STR(argList[3]); if (strBeginsWith(pathArg, FSLASH_STR)) - pathBuild = strPath(pathArg); + pathBuild = strDup(pathArg); else pathBuild = strPathAbsolute(pathArg, STR(currentWorkDir)); } - // Render help + // Repo and build storage const Storage *const storageRepo = storagePosixNewP(pathRepo); const Storage *const storageBuild = storagePosixNewP(pathBuild, .write = true); - const BldCfg bldCfg = bldCfgParse(storageRepo); - bldHlpRender(storageBuild, bldCfg, bldHlpParse(storageRepo, bldCfg)); + + // Config + if (strEqZ(STRDEF("config"), argList[1])) + bldCfgRender(storageBuild, bldCfgParse(storageRepo), true); + + // Error + if (strEqZ(STRDEF("error"), argList[1])) + bldErrRender(storageRepo, bldErrParse(storageRepo)); + + // Help + if (strEqZ(STRDEF("help"), argList[1])) + { + const BldCfg bldCfg = bldCfgParse(storageRepo); + bldHlpRender(storageBuild, bldCfg, bldHlpParse(storageRepo, bldCfg)); + } + + // PostgreSQL + if (strEqZ(STRDEF("postgres"), argList[1])) + bldPgRender(storageBuild, bldPgParse(storageRepo)); return 0; } diff --git a/src/build/postgres/main.c b/src/build/postgres/main.c deleted file mode 100644 index 9543c33b0..000000000 --- a/src/build/postgres/main.c +++ /dev/null @@ -1,50 +0,0 @@ -/*********************************************************************************************************************************** -Auto-Generate PostgreSQL Interface -***********************************************************************************************************************************/ -#include "build.auto.h" - -#include <unistd.h> - -#include "common/log.h" -#include "storage/posix/storage.h" - -#include "build/postgres/parse.h" -#include "build/postgres/render.h" - -int -main(int argListSize, const char *argList[]) -{ - // Check parameters - CHECK(ParamInvalidError, argListSize <= 2, "only one parameter allowed"); - - // Initialize logging - logInit(logLevelWarn, logLevelError, logLevelOff, false, 0, 1, false); - - // Get current working directory - char currentWorkDir[1024]; - THROW_ON_SYS_ERROR(getcwd(currentWorkDir, sizeof(currentWorkDir)) == NULL, FormatError, "unable to get cwd"); - - // Get repo path (cwd if it was not passed) - const String *pathRepo = strPath(STR(currentWorkDir)); - String *const pathOut = strCatZ(strNew(), currentWorkDir); - - if (argListSize >= 2) - { - const String *const pathArg = STR(argList[1]); - - if (strBeginsWith(pathArg, FSLASH_STR)) - pathRepo = strPath(pathArg); - else - { - pathRepo = strPathAbsolute(pathArg, STR(currentWorkDir)); - strCatZ(pathOut, "/src"); - } - } - - // Render postgres - const Storage *const storageRepo = storagePosixNewP(pathRepo); - const Storage *const storageBuild = storagePosixNewP(pathOut, .write = true); - bldPgRender(storageBuild, bldPgParse(storageRepo)); - - return 0; -} diff --git a/src/build/postgres/render.c b/src/build/postgres/render.c index 824b738b2..329b0a9b6 100644 --- a/src/build/postgres/render.c +++ b/src/build/postgres/render.c @@ -131,7 +131,7 @@ bldPgRenderInterfaceAutoC(const Storage *const storageRepo, const BldPg bldPg) pg, "};\n"); - bldPut(storageRepo, "postgres/interface.auto.c.inc", BUFSTR(pg)); + bldPut(storageRepo, "src/postgres/interface.auto.c.inc", BUFSTR(pg)); } /**********************************************************************************************************************************/ diff --git a/src/command/help/meson.build b/src/command/help/meson.build index 6dbe6c79c..38ba86cd8 100644 --- a/src/command/help/meson.build +++ b/src/command/help/meson.build @@ -9,7 +9,8 @@ help_auto_c_inc = custom_target( '../../build/help/help.xml', ], command : [ - build_help, - '@CURRENT_SOURCE_DIR@/../../..' + build_code, + 'help', + '@CURRENT_SOURCE_DIR@/../../..', ], ) diff --git a/src/common/error.auto.c.inc b/src/common/error.auto.c.inc index 4247a17e4..76af39b5e 100644 --- a/src/common/error.auto.c.inc +++ b/src/common/error.auto.c.inc @@ -1,7 +1,7 @@ /*********************************************************************************************************************************** Error Type Definition -Automatically generated by 'make build-error' -- do not modify directly. +Automatically generated by 'build-code error' -- do not modify directly. ***********************************************************************************************************************************/ /*********************************************************************************************************************************** diff --git a/src/common/error.auto.h b/src/common/error.auto.h index 7d7891df3..ad09c35e2 100644 --- a/src/common/error.auto.h +++ b/src/common/error.auto.h @@ -1,7 +1,7 @@ /*********************************************************************************************************************************** Error Type Definition -Automatically generated by 'make build-error' -- do not modify directly. +Automatically generated by 'build-code error' -- do not modify directly. ***********************************************************************************************************************************/ #ifndef COMMON_ERROR_AUTO_H #define COMMON_ERROR_AUTO_H diff --git a/src/config/config.auto.h b/src/config/config.auto.h index 1d041eea3..ea03df6b1 100644 --- a/src/config/config.auto.h +++ b/src/config/config.auto.h @@ -1,7 +1,7 @@ /*********************************************************************************************************************************** Command and Option Configuration -Automatically generated by 'make build-config' -- do not modify directly. +Automatically generated by 'build-code config' -- do not modify directly. ***********************************************************************************************************************************/ #ifndef CONFIG_CONFIG_AUTO_H #define CONFIG_CONFIG_AUTO_H diff --git a/src/config/parse.auto.c.inc b/src/config/parse.auto.c.inc index 9ea5a85a5..6563598c0 100644 --- a/src/config/parse.auto.c.inc +++ b/src/config/parse.auto.c.inc @@ -1,7 +1,7 @@ /*********************************************************************************************************************************** Config Parse Rules -Automatically generated by 'make build-config' -- do not modify directly. +Automatically generated by 'build-code config' -- do not modify directly. ***********************************************************************************************************************************/ /*********************************************************************************************************************************** diff --git a/src/meson.build b/src/meson.build index 35aac7afd..8cbac4458 100644 --- a/src/meson.build +++ b/src/meson.build @@ -51,66 +51,29 @@ src_common = files( ) #################################################################################################################################### -# Build config target +# Build code target #################################################################################################################################### -src_build_config = [ +src_build_code = [ 'build/common/render.c', 'build/common/yaml.c', - 'build/config/main.c', 'build/config/parse.c', 'build/config/render.c', -] - -build_config = executable( - 'build-config', - src_common, - src_build_config, - dependencies : [ - lib_yaml - ], - build_by_default: false, -) - -#################################################################################################################################### -# Build error target -#################################################################################################################################### -src_build_error = [ - 'build/common/render.c', - 'build/common/yaml.c', - 'build/error/main.c', 'build/error/parse.c', 'build/error/render.c', -] - -build_error = executable( - 'build-error', - src_common, - src_build_error, - dependencies : [ - lib_yaml - ], - build_by_default: false, -) - -#################################################################################################################################### -# Build help target -#################################################################################################################################### -src_build_help = [ - 'build/common/render.c', - 'build/common/yaml.c', - 'build/config/parse.c', - 'build/help/main.c', 'build/help/parse.c', 'build/help/render.c', + 'build/postgres/parse.c', + 'build/postgres/render.c', + 'build/main.c', 'common/compress/bz2/common.c', 'common/compress/bz2/compress.c', 'common/type/xml.c', ] -build_help = executable( - 'build-help', +build_code = executable( + 'build-code', src_common, - src_build_help, + src_build_code, dependencies: [ lib_bz2, lib_xml, @@ -118,30 +81,10 @@ build_help = executable( ], ) -# build help.auto.c.inc +# Build help.auto.c.inc subdir('command/help') -#################################################################################################################################### -# Build postgres target -#################################################################################################################################### -src_build_postgres = [ - 'build/common/render.c', - 'build/common/yaml.c', - 'build/postgres/main.c', - 'build/postgres/parse.c', - 'build/postgres/render.c', -] - -build_postgres = executable( - 'build-postgres', - src_common, - src_build_postgres, - dependencies : [ - lib_yaml - ], -) - -# build interface.auto.c.inc +# Build interface.auto.c.inc subdir('postgres') #################################################################################################################################### diff --git a/src/postgres/meson.build b/src/postgres/meson.build index 3de55fdf1..3cb2a200e 100644 --- a/src/postgres/meson.build +++ b/src/postgres/meson.build @@ -8,7 +8,8 @@ interface_auto_c_inc = custom_target( '../build/postgres/postgres.yaml', ], command : [ - build_postgres, - '@CURRENT_SOURCE_DIR@/../..' + build_code, + 'postgres', + '@CURRENT_SOURCE_DIR@/../..', ], ) diff --git a/test/src/command/help/meson.build b/test/src/command/help/meson.build index de7997303..41dd2d87f 100644 --- a/test/src/command/help/meson.build +++ b/test/src/command/help/meson.build @@ -9,7 +9,8 @@ test_help_auto_c_inc = custom_target( '../../build/help/help.xml', ], command: [ - build_help, + build_code, + 'help', '@CURRENT_SOURCE_DIR@/../../..', '@BUILD_ROOT@/test/src', ], diff --git a/test/src/config/meson.build b/test/src/config/meson.build index 24b71e8ac..8e35d5acd 100644 --- a/test/src/config/meson.build +++ b/test/src/config/meson.build @@ -8,7 +8,8 @@ test_parse_auto_c_inc = custom_target( '../build/config/config.yaml', ], command : [ - build_config, + build_code, + 'config', '@CURRENT_SOURCE_DIR@/../..', '@BUILD_ROOT@/test', ], diff --git a/test/src/module/build/configTest.c b/test/src/module/build/configTest.c index 2fab80eac..8dd225477 100644 --- a/test/src/module/build/configTest.c +++ b/test/src/module/build/configTest.c @@ -452,7 +452,7 @@ testRun(void) COMMENT_BLOCK_BEGIN "\n" "Command and Option Configuration\n" "\n" - "Automatically generated by 'make build-config' -- do not modify directly.\n" + "Automatically generated by 'build-code config' -- do not modify directly.\n" COMMENT_BLOCK_END "\n" "#ifndef CONFIG_CONFIG_AUTO_H\n" "#define CONFIG_CONFIG_AUTO_H\n" @@ -569,7 +569,7 @@ testRun(void) COMMENT_BLOCK_BEGIN "\n" "Config Parse Rules\n" "\n" - "Automatically generated by 'make build-config' -- do not modify directly.\n" + "Automatically generated by 'build-code config' -- do not modify directly.\n" COMMENT_BLOCK_END "\n" "\n" COMMENT_BLOCK_BEGIN "\n" diff --git a/test/src/module/build/errorTest.c b/test/src/module/build/errorTest.c index e6cfd4abf..7f8b7e1c7 100644 --- a/test/src/module/build/errorTest.c +++ b/test/src/module/build/errorTest.c @@ -61,7 +61,7 @@ testRun(void) COMMENT_BLOCK_BEGIN "\n" "Error Type Definition\n" "\n" - "Automatically generated by 'make build-error' -- do not modify directly.\n" + "Automatically generated by 'build-code error' -- do not modify directly.\n" COMMENT_BLOCK_END "\n" "#ifndef COMMON_ERROR_AUTO_H\n" "#define COMMON_ERROR_AUTO_H\n" @@ -84,7 +84,7 @@ testRun(void) COMMENT_BLOCK_BEGIN "\n" "Error Type Definition\n" "\n" - "Automatically generated by 'make build-error' -- do not modify directly.\n" + "Automatically generated by 'build-code error' -- do not modify directly.\n" COMMENT_BLOCK_END "\n" "\n" COMMENT_BLOCK_BEGIN "\n" diff --git a/test/src/module/build/helpTest.c b/test/src/module/build/helpTest.c index c70f46091..2245770af 100644 --- a/test/src/module/build/helpTest.c +++ b/test/src/module/build/helpTest.c @@ -402,7 +402,7 @@ testRun(void) TEST_TITLE("check help file"); TEST_RESULT_VOID(bldHlpRender(storageTest, bldCfg, bldHlpParse(storageTest, bldCfg)), "write file"); - TEST_STORAGE_EXISTS(storageTest, "command/help/help.auto.c.inc"); + TEST_STORAGE_EXISTS(storageTest, "src/command/help/help.auto.c.inc"); } FUNCTION_HARNESS_RETURN_VOID(); diff --git a/test/src/module/build/postgresTest.c b/test/src/module/build/postgresTest.c index f16892201..5564b7825 100644 --- a/test/src/module/build/postgresTest.c +++ b/test/src/module/build/postgresTest.c @@ -87,11 +87,11 @@ testRun(void) TEST_STORAGE_GET( storageTest, - "postgres/interface.auto.c.inc", + "src/postgres/interface.auto.c.inc", COMMENT_BLOCK_BEGIN "\n" "PostgreSQL Interface\n" "\n" - "Automatically generated by 'make build-postgres' -- do not modify directly.\n" + "Automatically generated by 'build-code postgres' -- do not modify directly.\n" COMMENT_BLOCK_END "\n" "\n" COMMENT_BLOCK_BEGIN "\n" diff --git a/test/test.pl b/test/test.pl index 9cd46ec70..a236c99e2 100755 --- a/test/test.pl +++ b/test/test.pl @@ -536,10 +536,10 @@ eval # Build code executeTest( - "ninja -C ${strBuildPath}" . ($bMinGen ? '' : ' src/build-config src/build-error') . ' src/build-postgres' . - ($bMinGen ? '' : " && ${strBuildPath}/src/build-config ${strBackRestBase}/src") . - ($bMinGen ? '' : " && ${strBuildPath}/src/build-error ${strBackRestBase}/src") . - " && cd $strRepoCachePath/src && ${strBuildPath}/src/build-postgres"); + "ninja -C ${strBuildPath} src/build-code" . + ($bMinGen ? '' : " && ${strBuildPath}/src/build-code config ${strBackRestBase}/src") . + ($bMinGen ? '' : " && ${strBuildPath}/src/build-code error ${strBackRestBase}/src") . + " && cd $strRepoCachePath/src && ${strBuildPath}/src/build-code postgres"); if ($bGenOnly) { [parent: 7eb5d6798579]