forked from lix-project/hydra
tests: create a declarative project spec and the autoconfig machinery
This commit is contained in:
parent
9d3b14dd43
commit
eef633c1cc
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -33,6 +33,7 @@ Makefile.in
|
||||||
/t/nix
|
/t/nix
|
||||||
/t/data
|
/t/data
|
||||||
/t/jobs/config.nix
|
/t/jobs/config.nix
|
||||||
|
t/jobs/declarative/project.json
|
||||||
/inst
|
/inst
|
||||||
hydra-config.h
|
hydra-config.h
|
||||||
hydra-config.h.in
|
hydra-config.h.in
|
||||||
|
|
|
@ -43,7 +43,7 @@ then
|
||||||
NIX_STATE_DIR="$TMPDIR"
|
NIX_STATE_DIR="$TMPDIR"
|
||||||
export NIX_STATE_DIR
|
export NIX_STATE_DIR
|
||||||
fi
|
fi
|
||||||
if NIX_REMOTE=daemon PAGER=cat "$NIX_STORE_PROGRAM" --timeout 123 -q; then
|
if NIX_REMOTE=daemon PAGER=cat "$NIX_STORE_PROGRAM" --timeout 123 -q; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
|
@ -55,6 +55,9 @@ PKG_CHECK_MODULES([NIX], [nix-main nix-expr nix-store])
|
||||||
testPath="$(dirname $(type -p expr))"
|
testPath="$(dirname $(type -p expr))"
|
||||||
AC_SUBST(testPath)
|
AC_SUBST(testPath)
|
||||||
|
|
||||||
|
jobsPath="$(realpath ./t/jobs)"
|
||||||
|
AC_SUBST(jobsPath)
|
||||||
|
|
||||||
CXXFLAGS+=" -include nix/config.h"
|
CXXFLAGS+=" -include nix/config.h"
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
|
@ -72,6 +75,7 @@ AC_CONFIG_FILES([
|
||||||
src/script/Makefile
|
src/script/Makefile
|
||||||
t/Makefile
|
t/Makefile
|
||||||
t/jobs/config.nix
|
t/jobs/config.nix
|
||||||
|
t/jobs/declarative/project.json
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CONFIG_COMMANDS([executable-scripts], [])
|
AC_CONFIG_COMMANDS([executable-scripts], [])
|
||||||
|
|
24
t/jobs/declarative/project.json.in
Normal file
24
t/jobs/declarative/project.json.in
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "declarative-jobset-example",
|
||||||
|
"nixexprinput": "src",
|
||||||
|
"nixexprpath": "declarative/generator.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 100,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 3,
|
||||||
|
"inputs": {
|
||||||
|
"src": {
|
||||||
|
"type": "path",
|
||||||
|
"value": "@jobsPath@",
|
||||||
|
"emailresponsible": false
|
||||||
|
},
|
||||||
|
"jobspath": {
|
||||||
|
"type": "string",
|
||||||
|
"value": "@jobsPath@",
|
||||||
|
"emailresponsible": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue