[pisa-src] r2552 - in trunk/tools/testbed: plugins/actions/build/pre_hook plugins/actions/prepare/pre_hook plugins/classes/hipl plugins/classes/hipl/build_pre_hook plugins/classes/hipl/prepare_pre_hook plugin...

  • From: Samuel Richter <samuel.richter@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Sun, 24 Apr 2011 22:57:57 +0200

Author: richter
Date: Sun Apr 24 22:57:57 2011
New Revision: 2552

Log:
remove the special extern classes from testbed environment

Now there is only one type of class, if code has to be run only once for all
nodes the pre_hook of its action calls a file ACTION_pre_hook if it's in the
folder of the class

Added:
   trunk/tools/testbed/plugins/actions/build/pre_hook
   trunk/tools/testbed/plugins/actions/prepare/pre_hook
   trunk/tools/testbed/plugins/classes/hipl/
   trunk/tools/testbed/plugins/classes/hipl/build_pre_hook
      - copied, changed from r2544, 
trunk/tools/testbed/plugins/extern/hipl/build
   trunk/tools/testbed/plugins/classes/hipl/prepare_pre_hook
      - copied, changed from r2544, 
trunk/tools/testbed/plugins/extern/hipl/prepare
   trunk/tools/testbed/plugins/classes/pisa/
   trunk/tools/testbed/plugins/classes/pisa/build_pre_hook
      - copied, changed from r2544, 
trunk/tools/testbed/plugins/extern/pisa/build
   trunk/tools/testbed/plugins/classes/pisa/prepare_pre_hook
      - copied, changed from r2544, 
trunk/tools/testbed/plugins/extern/pisa/prepare
Deleted:
   trunk/tools/testbed/plugins/extern/
Modified:
   trunk/tools/testbed/scripts/pisa-testbed

Added: trunk/tools/testbed/plugins/actions/build/pre_hook
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/tools/testbed/plugins/actions/build/pre_hook  Sun Apr 24 22:57:57 
2011        (r2552)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+cat $BUILD_PATH/${NODE}_classes | while read -r CLASS; do
+    CLASS_PATH=$TESTBED_PATH/plugins/classes/$CLASS
+    if [ -d $CLASS_PATH ]; then
+        [ -f $CLASS_PATH/${ACTION}_pre_hook ] && . 
$CLASS_PATH/${ACTION}_pre_hook && ${ACTION}_${CLASS}_pre_hook
+    fi
+done

Added: trunk/tools/testbed/plugins/actions/prepare/pre_hook
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/tools/testbed/plugins/actions/prepare/pre_hook        Sun Apr 24 
22:57:57 2011        (r2552)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+cat $BUILD_PATH/${NODE}_classes | while read -r CLASS; do
+    CLASS_PATH=$TESTBED_PATH/plugins/classes/$CLASS
+    if [ -d $CLASS_PATH ]; then
+        [ -f $CLASS_PATH/${ACTION}_pre_hook ] && . 
$CLASS_PATH/${ACTION}_pre_hook && ${ACTION}_${CLASS}_pre_hook
+    fi
+done

Copied and modified: trunk/tools/testbed/plugins/classes/hipl/build_pre_hook 
(from r2544, trunk/tools/testbed/plugins/extern/hipl/build)
==============================================================================
--- trunk/tools/testbed/plugins/extern/hipl/build       Tue Apr 19 17:23:24 
2011        (r2544, copy source)
+++ trunk/tools/testbed/plugins/classes/hipl/build_pre_hook     Sun Apr 24 
22:57:57 2011        (r2552)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-build_hipl(){
+build_hipl_pre_hook(){
     echo "building hipl"
     # collect all classes of nodes that have the hipl class
     grep -l hipl "$BUILD_PATH"/*_classes | xargs cat | sort | uniq | while 
read -r PKG_CLASS; do

Copied and modified: trunk/tools/testbed/plugins/classes/hipl/prepare_pre_hook 
(from r2544, trunk/tools/testbed/plugins/extern/hipl/prepare)
==============================================================================
--- trunk/tools/testbed/plugins/extern/hipl/prepare     Tue Apr 19 17:23:24 
2011        (r2544, copy source)
+++ trunk/tools/testbed/plugins/classes/hipl/prepare_pre_hook   Sun Apr 24 
22:57:57 2011        (r2552)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-prepare_hipl(){
+prepare_hipl_pre_hook(){
     [ "$HIPL_PATH" ] || HIPL_PATH="$BUILD_PATH/hipl/trunk"
     echo "preparing hipl using hipl-tree in $HIPL_PATH"
     if ! [ -d "$HIPL_PATH" ]; then

Copied and modified: trunk/tools/testbed/plugins/classes/pisa/build_pre_hook 
(from r2544, trunk/tools/testbed/plugins/extern/pisa/build)
==============================================================================
--- trunk/tools/testbed/plugins/extern/pisa/build       Tue Apr 19 17:23:24 
2011        (r2544, copy source)
+++ trunk/tools/testbed/plugins/classes/pisa/build_pre_hook     Sun Apr 24 
22:57:57 2011        (r2552)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-build_pisa(){
+build_pisa_pre_hook(){
     # collect all classes of nodes that have the pisa class
     grep -l pisa "$BUILD_PATH"/*_classes | xargs cat | sort | uniq | while 
read -r PKG_CLASS; do
         case $PKG_CLASS in

Copied and modified: trunk/tools/testbed/plugins/classes/pisa/prepare_pre_hook 
(from r2544, trunk/tools/testbed/plugins/extern/pisa/prepare)
==============================================================================
--- trunk/tools/testbed/plugins/extern/pisa/prepare     Tue Apr 19 17:23:24 
2011        (r2544, copy source)
+++ trunk/tools/testbed/plugins/classes/pisa/prepare_pre_hook   Sun Apr 24 
22:57:57 2011        (r2552)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-prepare_pisa(){
+prepare_pisa_pre_hook(){
     [ "$PISA_PATH" ] || PISA_PATH="$BUILD_PATH/pisa/trunk"
     echo "preparing pisa ..."
     if ! [ -d "$PISA_PATH" ]; then

Modified: trunk/tools/testbed/scripts/pisa-testbed
==============================================================================
--- trunk/tools/testbed/scripts/pisa-testbed    Tue Apr 19 19:17:16 2011        
(r2551)
+++ trunk/tools/testbed/scripts/pisa-testbed    Sun Apr 24 22:57:57 2011        
(r2552)
@@ -91,13 +91,6 @@
 [ -d "$PLUGIN_PATH/actions/$ACTION" ] || (echo "action \"${ACTION}\" not 
found"; usage; exit 1)
 ARGUMENTS=$*
 
-for NODE in $TARGETS; do cat "$BUILD_PATH/$NODE"_classes; done | sort | uniq | 
while read -r CLASS; do
-   CLASS_PATH="$TESTBED_PATH/plugins/extern/$CLASS"
-   if [ -d "$CLASS_PATH" ]; then
-       [ -f "$CLASS_PATH/$ACTION" ] && . "$CLASS_PATH/$ACTION" && 
"${ACTION}_$CLASS"
-   fi
-done
-
 [ -f "$PLUGIN_PATH/actions/$ACTION/pre_hook" ] && . 
"$PLUGIN_PATH/actions/$ACTION/pre_hook"
 
 if [ -f "$PLUGIN_PATH/actions/$ACTION/node_hook" ]; then
-- 
This is the pisa developer mailing list. Please also subscribe to the main pisa 
list at:
//www.freelists.org/list/pisa

Other related posts:

  • » [pisa-src] r2552 - in trunk/tools/testbed: plugins/actions/build/pre_hook plugins/actions/prepare/pre_hook plugins/classes/hipl plugins/classes/hipl/build_pre_hook plugins/classes/hipl/prepare_pre_hook plugin... - Samuel Richter