Skip to content

Commit

Permalink
Merge pull request #127 from minijackson/test-example-ioc
Browse files Browse the repository at this point in the history
Test `makeBaseApp.pl` example ioc
  • Loading branch information
stephane-cea authored Jul 29, 2024
2 parents e37cfb1 + 4833ebd commit 10c2d54
Show file tree
Hide file tree
Showing 27 changed files with 182 additions and 323 deletions.
13 changes: 13 additions & 0 deletions ioc/tests/default-ioc/default-top-3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/simpleApp/Db/Makefile b/simpleApp/Db/Makefile
index 8eb9727..ea49598 100644
--- a/simpleApp/Db/Makefile
+++ b/simpleApp/Db/Makefile
@@ -6,7 +6,7 @@ include $(TOP)/configure/CONFIG
#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
-#DB += xxx.db
+DB += simple.db

#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
26 changes: 26 additions & 0 deletions ioc/tests/default-ioc/default-top-7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/iocBoot/iocSimple/st.cmd b/iocBoot/iocSimple/st.cmd
index abda300..0d162ac 100644
--- a/iocBoot/iocSimple/st.cmd
+++ b/iocBoot/iocSimple/st.cmd
@@ -10,7 +10,7 @@ dbLoadDatabase "../../dbd/simple.dbd"
simple_registerRecordDeviceDriver(pdbbase)

## Load record instances
-#dbLoadRecords("../../db/simple.db","user=epnix")
+dbLoadRecords("../../db/simple.db","user=epnix")

iocInit()

diff --git a/simpleApp/Db/Makefile b/simpleApp/Db/Makefile
index 8eb9727..ea49598 100644
--- a/simpleApp/Db/Makefile
+++ b/simpleApp/Db/Makefile
@@ -6,7 +6,7 @@ include $(TOP)/configure/CONFIG
#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
-#DB += xxx.db
+DB += simple.db

#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
2 changes: 1 addition & 1 deletion ioc/tests/default-ioc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ releaseBranch: {pkgs, ...}: let
result = epnixLib.evalEpnixModules {
nixpkgsConfig.system = system;
epnixConfig.imports = [
(import ./top/epnix.nix releaseBranch)
(import ./epnix.nix releaseBranch)
];
};

Expand Down
28 changes: 28 additions & 0 deletions ioc/tests/default-ioc/epnix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
releaseBranch: {pkgs, ...}: {
epnix = {
meta.name = "checks-default-ioc";
buildConfig.src =
pkgs.runCommand "default-top" {
nativeBuildInputs = [pkgs.epnix.epics-base];
} ''
mkdir $out
cd $out
makeBaseApp.pl -u epnix -t ioc simple
makeBaseApp.pl -u epnix -t ioc -i -a linux-x86_64 -p simple Simple
'';

buildConfig.attrs = {
patches = [./default-top-${releaseBranch}.patch];
postPatch = ''
cp ${./simple.db} simpleApp/Db/simple.db
'';
};

epics-base.releaseBranch = releaseBranch;

nixos.services.ioc = {
app = "simple";
ioc = "iocSimple";
};
};
}
File renamed without changes.
29 changes: 0 additions & 29 deletions ioc/tests/default-ioc/top/.gitignore

This file was deleted.

31 changes: 0 additions & 31 deletions ioc/tests/default-ioc/top/Makefile

This file was deleted.

45 changes: 0 additions & 45 deletions ioc/tests/default-ioc/top/configure/CONFIG

This file was deleted.

43 changes: 0 additions & 43 deletions ioc/tests/default-ioc/top/configure/CONFIG_SITE

This file was deleted.

8 changes: 0 additions & 8 deletions ioc/tests/default-ioc/top/configure/Makefile

This file was deleted.

42 changes: 0 additions & 42 deletions ioc/tests/default-ioc/top/configure/RELEASE

This file was deleted.

6 changes: 0 additions & 6 deletions ioc/tests/default-ioc/top/configure/RULES

This file was deleted.

2 changes: 0 additions & 2 deletions ioc/tests/default-ioc/top/configure/RULES.ioc

This file was deleted.

2 changes: 0 additions & 2 deletions ioc/tests/default-ioc/top/configure/RULES_DIRS

This file was deleted.

3 changes: 0 additions & 3 deletions ioc/tests/default-ioc/top/configure/RULES_TOP

This file was deleted.

13 changes: 0 additions & 13 deletions ioc/tests/default-ioc/top/epnix.nix

This file was deleted.

6 changes: 0 additions & 6 deletions ioc/tests/default-ioc/top/iocBoot/Makefile

This file was deleted.

5 changes: 0 additions & 5 deletions ioc/tests/default-ioc/top/iocBoot/iocsimple/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions ioc/tests/default-ioc/top/iocBoot/iocsimple/st.cmd

This file was deleted.

11 changes: 0 additions & 11 deletions ioc/tests/default-ioc/top/simpleApp/Db/Makefile

This file was deleted.

14 changes: 0 additions & 14 deletions ioc/tests/default-ioc/top/simpleApp/Makefile

This file was deleted.

29 changes: 0 additions & 29 deletions ioc/tests/default-ioc/top/simpleApp/src/Makefile

This file was deleted.

Loading

0 comments on commit 10c2d54

Please sign in to comment.