From 7d1e3a6723dcea9e6dcdc0641a90082e1db996a9 Mon Sep 17 00:00:00 2001 From: Michael Haberler Date: Sun, 9 Aug 2015 21:39:18 +0000 Subject: [PATCH 1/4] regressions/ck_cohort: make it pass with CORES=1 --- regressions/ck_cohort/validate/validate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/regressions/ck_cohort/validate/validate.c b/regressions/ck_cohort/validate/validate.c index c2453c4..cffbf77 100644 --- a/regressions/ck_cohort/validate/validate.c +++ b/regressions/ck_cohort/validate/validate.c @@ -160,7 +160,8 @@ main(int argc, char *argv[]) n_cohorts = atoi(argv[1]); if (n_cohorts <= 0) { - ck_error("ERROR: Number of cohorts must be greater than 0\n"); + fprintf(stderr, "setting number of cohorts per thread to 1\n"); + n_cohorts = 1; } threads_per_cohort = atoi(argv[2]); From ce7d26aad4775678feeef088d922ecaf4dda6f40 Mon Sep 17 00:00:00 2001 From: Michael Haberler Date: Mon, 10 Aug 2015 00:33:23 +0200 Subject: [PATCH 2/4] ck_mg.h: provide printable version tag as CK_VERSION --- include/ck_md.h.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ck_md.h.in b/include/ck_md.h.in index 7817aa4..60c791b 100644 --- a/include/ck_md.h.in +++ b/include/ck_md.h.in @@ -51,4 +51,6 @@ #define @MM@ #endif /* @MM@ */ +#define CK_VERSION "@VERSION@" + #endif /* CK_MD_H */ From ac2a3ea3e78949a4f22d74c525e8a1e82fc61649 Mon Sep 17 00:00:00 2001 From: Michael Haberler Date: Mon, 10 Aug 2015 07:29:55 +0200 Subject: [PATCH 3/4] configure: fix typo in PC_FLAGS pattern --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index e9bc517..5c21d11 100755 --- a/configure +++ b/configure @@ -111,7 +111,7 @@ generate() -e "s#@LDNAME@#$LDNAME#g" \ -e "s#@LDNAME_MAJOR@#$LDNAME_MAJOR#g" \ -e "s#@LDNAME_VERSION@#$LDNAME_VERSION#g" \ - -e "s#@PC_CFLAGS#$PC_CFLAGS#g" \ + -e "s#@PC_CFLAGS@#$PC_CFLAGS#g" \ $1 > $2 } From 118cc8eae824c23026913920b11c6b3c9e6a5eb0 Mon Sep 17 00:00:00 2001 From: Michael Haberler Date: Mon, 10 Aug 2015 07:36:55 +0200 Subject: [PATCH 4/4] configure: detect git SHA, export as string CK_GIT_SHA in ck_md.h this helps correlating tests by other people --- configure | 22 ++++++++++++++++++++++ include/ck_md.h.in | 1 + 2 files changed, 23 insertions(+) diff --git a/configure b/configure index 5c21d11..1c438b1 100755 --- a/configure +++ b/configure @@ -82,6 +82,22 @@ assert() fi } +get_git_sha() +{ + # return a short SHA for the current HEAD + GIT_SHA="" + GIT_MSG="success" + gitcmd=`which git` + if test -n "$gitcmd"; then + GIT_SHA=`git rev-parse --short HEAD 2>/dev/null` + if ! test -n "$GIT_SHA"; then + GIT_MSG="not within a git repo" + fi + else + GIT_MSG="git not installed or executable" + fi +} + generate() { sed -e "s#@PROFILE@#$PROFILE#g" \ @@ -112,6 +128,7 @@ generate() -e "s#@LDNAME_MAJOR@#$LDNAME_MAJOR#g" \ -e "s#@LDNAME_VERSION@#$LDNAME_VERSION#g" \ -e "s#@PC_CFLAGS@#$PC_CFLAGS#g" \ + -e "s#@GIT_SHA@#$GIT_SHA#g" \ $1 > $2 } @@ -120,6 +137,7 @@ generate_stdout() echo echo " VERSION = $VERSION" + echo " GIT_SHA = $GIT_SHA" echo " BUILD_DIR = $P_PWD" echo " SRC_DIR = $BUILD_DIR" echo " SYSTEM = $SYSTEM" @@ -685,6 +703,10 @@ EOF fi done +printf "Detecting git SHA................" +get_git_sha +echo "$GIT_MSG [$GIT_SHA]" + if test "$PROFILE"; then printf "Using user-specified profile....." diff --git a/include/ck_md.h.in b/include/ck_md.h.in index 60c791b..07dd384 100644 --- a/include/ck_md.h.in +++ b/include/ck_md.h.in @@ -52,5 +52,6 @@ #endif /* @MM@ */ #define CK_VERSION "@VERSION@" +#define CK_GIT_SHA "@GIT_SHA@" #endif /* CK_MD_H */