lcpex rewrite - alpha

This commit is contained in:
phanes
2023-02-15 18:44:21 -05:00
parent bb85754dc0
commit 7ed6e13fa5
82 changed files with 4510 additions and 2592 deletions

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
echo CURSES DIALOG TEST
echo "This is a test of how curses dialogs are handled. Expect freaky behaviour."
whiptail --title "Dialog title" --inputbox "Enter your name:" 0 0
exit $?

View File

@@ -0,0 +1,6 @@
#!/bin/bash
echo "dependent test"
echo This test depends on another test having succeeded in order to execute.
echo This tests dependencies.
exit $?

6
sample/components/fail.bash Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
echo "Failure handling test."
echo "This test will fail on purpose."
>&2 echo "This test is printing to stderr."
exit 1

View File

@@ -0,0 +1,5 @@
#!/bin/bash
echo "This is an independent test. It does not depend on other tests."
echo "Environment file check: TEST_VAR from environment file is set to: $TEST_VAR"
exit $?

View File

@@ -0,0 +1,3 @@
echo "independent test 2 output"
echo "independent test says TEST_VAR is ${TEST_VAR}"
exit $?

View File

@@ -0,0 +1,11 @@
#!/usr/bin/bash
set -a
echo "variables file says hello and set a variable named TEST_VAR"
TEST_VAR="999"

View File

@@ -0,0 +1,2 @@
lcpex: setgid failed: Operation not permitted
lcpex: Aborting: Setting GID failed: bagira/bagira

View File

@@ -0,0 +1 @@
/usr/bin/bash: line 1: /home/phanes/development/internal/rex-rewrite/sample/environments/rex.variables: Permission denied

View File

@@ -0,0 +1 @@
/usr/bin/bash: line 1: /home/phanes/development/internal/rex-rewrite/sample/environments/rex.variables: Permission denied

6
sample/plans/atomic.plan Normal file
View File

@@ -0,0 +1,6 @@
{
"plan": [
{ "name": "independent test 1", "dependencies": [ null ] },
{ "name": "independent test 2", "dependencies": [ null ] }
]
}

5
sample/plans/test.plan Normal file
View File

@@ -0,0 +1,5 @@
{
"plan": [
{ "name": "independent test 1", "dependencies": [ null ] }
]
}

9
sample/rex.config Normal file
View File

@@ -0,0 +1,9 @@
{
"config": {
"project_root": "/home/phanes/development/internal/rex-rewrite/sample",
"units_path": "units/",
"logs_path": "logs/",
"shells_path": "shells/shells.definitions",
"config_version": "5"
}
}

View File

@@ -0,0 +1,16 @@
{
"shells": [
{
"name": "bash",
"path": "/usr/bin/bash",
"execution_arg": "-c",
"source_cmd": "source"
},
{
"name": "ksh",
"path": "/usr/bin/ksh",
"execution_arg": "-c",
"source_cmd": "source"
}
]
}

BIN
sample/units/.new.units.swp Normal file

Binary file not shown.

22
sample/units/new.units Normal file
View File

@@ -0,0 +1,22 @@
{
"units": [
{
"name": "independent test 1",
"target": "components/independent_test_1.bash --ls -s --arg",
"is_shell_command": true,
"shell_definition": "bash",
"force_pty": true,
"set_working_directory": false,
"working_directory": "",
"rectify": false,
"rectifier": "echo rectifier executed",
"active": true,
"required": true,
"set_user_context": true,
"user": "bagira",
"group": "bagira",
"supply_environment": true,
"environment": "environments/rex.variables"
}
]
}