Skip to content

Commit

Permalink
More development #1410
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeit-internet2 committed Mar 5, 2024
1 parent dbd3159 commit 7acbba3
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 0 deletions.
1 change: 1 addition & 0 deletions testbed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testbed.json
2 changes: 2 additions & 0 deletions testbed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PRODUCT := testbed.json

# Each subdirectory's Makefile produces a file called "output.json"
SUBDIRS := \
skeleton \
plugins \
schedules


Expand Down
3 changes: 3 additions & 0 deletions testbed/plugins/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output.json
work

32 changes: 32 additions & 0 deletions testbed/plugins/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Makefile for Testbed Plugins
#

PRODUCT := output.json

# Top of the source tree
TOP := ../..


default: build


WORK := work
$(WORK)::
rm -rf "$@"
mkdir -p "$@"
TO_CLEAN += $(WORK)


BUILDER := ./copy-plugin-json
$(PRODUCT): Makefile $(BUILDER) $(WORK)
$(BUILDER) '$(TOP)' '$(WORK)'
jq -s add $(WORK)/* > $@
TO_CLEAN += $(PRODUCT)


build: $(PRODUCT)


clean:
rm -rf $(TO_CLEAN) *~
21 changes: 21 additions & 0 deletions testbed/plugins/copy-plugin-json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh -e
#
# Find all of the plugins' output.json files and dump them into one
# place.
#

TOP="$1"
DEST="$2"

ls "${TOP}" \
| egrep -e '^pscheduler-(archiver|context|text|tool)-.*$' \
| (
while read PLUGIN
do
PLUGIN_FILE="${TOP}/${PLUGIN}/testbed.json"
if [ -e "${PLUGIN_FILE}" ]
then
cp "${PLUGIN_FILE}" "${DEST}/${PLUGIN}"
fi
done
)
1 change: 1 addition & 0 deletions testbed/schedules/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
output.json
12 changes: 12 additions & 0 deletions testbed/skeleton/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Makefile for Testbed Skeleton
#

default: build


build:
@true

clean:
rm -rf $(TO_CLEAN) *~
23 changes: 23 additions & 0 deletions testbed/skeleton/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"_meta": {
"administrators": [
{
"email": "[email protected]",
"name": "The perfSONAR Development Team"
}
],
"display-name": "perfSONAR Test Bed for pScheduler"
},
"addresses": {
},
"archives": {
},
"groups": {
},
"schedules": {
},
"tasks": {
},
"tests": {
}
}

0 comments on commit 7acbba3

Please sign in to comment.