From 116f0fd00c2f2e4b86684b15ebe76d430dfbc62b Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 14 Mar 2012 15:27:40 -0500 Subject: [PATCH] Run the tools/test files under the test harness --- src/Makefile | 3 +++ .../test/{Breaktable.pl => Breaktable.plt} | 3 +++ src/tools/test/{DBD.pl => DBD.plt} | 3 +++ src/tools/test/{Device.pl => Device.plt} | 3 +++ src/tools/test/{Driver.pl => Driver.plt} | 3 +++ src/tools/test/{Function.pl => Function.plt} | 3 +++ src/tools/test/Makefile | 26 +++++++++++++++++++ src/tools/test/{Menu.pl => Menu.plt} | 3 +++ src/tools/test/{Recfield.pl => Recfield.plt} | 3 +++ .../test/{Recordtype.pl => Recordtype.plt} | 3 +++ .../test/{Registrar.pl => Registrar.plt} | 3 +++ src/tools/test/{Variable.pl => Variable.plt} | 3 +++ src/tools/test/{macLib.pl => macLib.plt} | 2 +- 13 files changed, 60 insertions(+), 1 deletion(-) rename src/tools/test/{Breaktable.pl => Breaktable.plt} (90%) rename src/tools/test/{DBD.pl => DBD.plt} (96%) rename src/tools/test/{Device.pl => Device.plt} (93%) rename src/tools/test/{Driver.pl => Driver.plt} (73%) rename src/tools/test/{Function.pl => Function.plt} (74%) create mode 100644 src/tools/test/Makefile rename src/tools/test/{Menu.pl => Menu.plt} (94%) rename src/tools/test/{Recfield.pl => Recfield.plt} (98%) rename src/tools/test/{Recordtype.pl => Recordtype.plt} (95%) rename src/tools/test/{Registrar.pl => Registrar.plt} (74%) rename src/tools/test/{Variable.pl => Variable.plt} (84%) rename src/tools/test/{macLib.pl => macLib.plt} (98%) diff --git a/src/Makefile b/src/Makefile index 88a03d7c6..ad00bc90b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -15,6 +15,9 @@ include $(TOP)/configure/CONFIG DIRS += tools +DIRS += tools/test +tools/test_DEPEND_DIRS = tools + DIRS += template/base template/base_DEPEND_DIRS = tools diff --git a/src/tools/test/Breaktable.pl b/src/tools/test/Breaktable.plt similarity index 90% rename from src/tools/test/Breaktable.pl rename to src/tools/test/Breaktable.plt index 09285491a..36085d331 100644 --- a/src/tools/test/Breaktable.pl +++ b/src/tools/test/Breaktable.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 9; use DBD::Breaktable; diff --git a/src/tools/test/DBD.pl b/src/tools/test/DBD.plt similarity index 96% rename from src/tools/test/DBD.pl rename to src/tools/test/DBD.plt index d79341946..d6e5676da 100644 --- a/src/tools/test/DBD.pl +++ b/src/tools/test/DBD.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 18; use DBD; diff --git a/src/tools/test/Device.pl b/src/tools/test/Device.plt similarity index 93% rename from src/tools/test/Device.pl rename to src/tools/test/Device.plt index 0b960d2a5..d362054c2 100644 --- a/src/tools/test/Device.pl +++ b/src/tools/test/Device.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 16; use DBD::Device; diff --git a/src/tools/test/Driver.pl b/src/tools/test/Driver.plt similarity index 73% rename from src/tools/test/Driver.pl rename to src/tools/test/Driver.plt index 36f065996..f78c66da9 100644 --- a/src/tools/test/Driver.pl +++ b/src/tools/test/Driver.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 2; use DBD::Driver; diff --git a/src/tools/test/Function.pl b/src/tools/test/Function.plt similarity index 74% rename from src/tools/test/Function.pl rename to src/tools/test/Function.plt index 7df69e44f..6eb124fa8 100644 --- a/src/tools/test/Function.pl +++ b/src/tools/test/Function.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 2; use DBD::Function; diff --git a/src/tools/test/Makefile b/src/tools/test/Makefile new file mode 100644 index 000000000..b0864e38a --- /dev/null +++ b/src/tools/test/Makefile @@ -0,0 +1,26 @@ +#************************************************************************* +# Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne +# National Laboratory. +# EPICS BASE is distributed subject to a Software License Agreement found +# in the file LICENSE that is included with this distribution. +#************************************************************************* +TOP=../../.. + +include $(TOP)/configure/CONFIG + +TESTS += Breaktable +TESTS += DBD +TESTS += Device +TESTS += Driver +TESTS += Function +TESTS += macLib +TESTS += Menu +TESTS += Recfield +TESTS += Recordtype +TESTS += Registrar +TESTS += Variable + +TESTSCRIPTS_HOST += $(TESTS:%=%.t) + +include $(TOP)/configure/RULES + diff --git a/src/tools/test/Menu.pl b/src/tools/test/Menu.plt similarity index 94% rename from src/tools/test/Menu.pl rename to src/tools/test/Menu.plt index dc6db9841..f8da94b97 100644 --- a/src/tools/test/Menu.pl +++ b/src/tools/test/Menu.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 14; use DBD::Menu; diff --git a/src/tools/test/Recfield.pl b/src/tools/test/Recfield.plt similarity index 98% rename from src/tools/test/Recfield.pl rename to src/tools/test/Recfield.plt index 45f4e455c..bf92ea83d 100644 --- a/src/tools/test/Recfield.pl +++ b/src/tools/test/Recfield.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 76; use DBD::Recfield; diff --git a/src/tools/test/Recordtype.pl b/src/tools/test/Recordtype.plt similarity index 95% rename from src/tools/test/Recordtype.pl rename to src/tools/test/Recordtype.plt index b403ba103..1c829ae49 100644 --- a/src/tools/test/Recordtype.pl +++ b/src/tools/test/Recordtype.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 17; use DBD::Recordtype; diff --git a/src/tools/test/Registrar.pl b/src/tools/test/Registrar.plt similarity index 74% rename from src/tools/test/Registrar.pl rename to src/tools/test/Registrar.plt index 326cf0064..2c203c016 100644 --- a/src/tools/test/Registrar.pl +++ b/src/tools/test/Registrar.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 2; use DBD::Registrar; diff --git a/src/tools/test/Variable.pl b/src/tools/test/Variable.plt similarity index 84% rename from src/tools/test/Variable.pl rename to src/tools/test/Variable.plt index 84f67b0d8..c8a1a023d 100644 --- a/src/tools/test/Variable.pl +++ b/src/tools/test/Variable.plt @@ -1,5 +1,8 @@ #!/usr/bin/perl +use FindBin qw($Bin); +use lib "$Bin/../../../../lib/perl"; + use Test::More tests => 4; use DBD::Variable; diff --git a/src/tools/test/macLib.pl b/src/tools/test/macLib.plt similarity index 98% rename from src/tools/test/macLib.pl rename to src/tools/test/macLib.plt index e8419baa6..b0c987818 100644 --- a/src/tools/test/macLib.pl +++ b/src/tools/test/macLib.plt @@ -1,7 +1,7 @@ #!/usr/bin/perl use FindBin qw($Bin); -use lib "$Bin/../../../lib/perl"; +use lib "$Bin/../../../../lib/perl"; use Test::More tests => 34;