mirror of
https://github.com/nasa/trick.git
synced 2024-12-19 05:07:54 +00:00
Removed gsetup
This commit is contained in:
parent
ec579433c8
commit
5d8ae314ac
3
Makefile
3
Makefile
@ -342,7 +342,7 @@ premade:
|
|||||||
# TESTING
|
# TESTING
|
||||||
################################################################################
|
################################################################################
|
||||||
# This target runs Trick's Unit-tests and simulation-tests.
|
# This target runs Trick's Unit-tests and simulation-tests.
|
||||||
test: unit_test sim_test pytest
|
test: unit_test sim_test
|
||||||
@ echo "All tests completed sucessfully"
|
@ echo "All tests completed sucessfully"
|
||||||
|
|
||||||
.PHONY: $(UNIT_TEST_DIRS)
|
.PHONY: $(UNIT_TEST_DIRS)
|
||||||
@ -364,6 +364,7 @@ sim_test:
|
|||||||
pytest:
|
pytest:
|
||||||
make -C share/trick/pymods/trick
|
make -C share/trick/pymods/trick
|
||||||
|
|
||||||
|
|
||||||
#requirements:
|
#requirements:
|
||||||
# @ $(MAKE) -C trick_test/requirements_docs install
|
# @ $(MAKE) -C trick_test/requirements_docs install
|
||||||
|
|
||||||
|
5
gsetup
5
gsetup
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/python3
|
|
||||||
import os
|
|
||||||
from trick_source.trick_gsetup.main import main
|
|
||||||
|
|
||||||
main()
|
|
@ -6,7 +6,7 @@ import subprocess
|
|||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))), '../..')))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))), '../..')))
|
||||||
from trick.utils import is_web_server_started, params
|
from utils import is_web_server_started, params
|
||||||
|
|
||||||
# store history of failures per test class name and per index in parametrize (if parametrize used)
|
# store history of failures per test class name and per index in parametrize (if parametrize used)
|
||||||
web_server_status = {}
|
web_server_status = {}
|
||||||
@ -56,7 +56,6 @@ trick.exec_set_freeze_command(True)""")
|
|||||||
cmd = f'echo "cd {params.get_path_to_sim()} && ./S_main_Linux_9.3_x86_64.exe {os.path.join(params.get_input_folder(), params.get_test_input_file())} &" | /bin/bash'
|
cmd = f'echo "cd {params.get_path_to_sim()} && ./S_main_Linux_9.3_x86_64.exe {os.path.join(params.get_input_folder(), params.get_test_input_file())} &" | /bin/bash'
|
||||||
print("....................Running:", cmd)
|
print("....................Running:", cmd)
|
||||||
subprocess.run(cmd, shell=True)
|
subprocess.run(cmd, shell=True)
|
||||||
os.system("/bin/bash")
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session", autouse=True)
|
@pytest.fixture(scope="session", autouse=True)
|
||||||
def close_sim():
|
def close_sim():
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
PYTHON = python3
|
PYTHON = python
|
||||||
|
|
||||||
test: venv
|
test: venv
|
||||||
venv/bin/python -m pytest tests/civet_server/test_http.py tests/civet_server/test_ws.py tests/gsetup
|
venv/bin/python -m pytest tests/civet_server/test_http.py tests/civet_server/test_ws.py # tests/gsetup
|
||||||
|
|
||||||
venv:
|
venv:
|
||||||
$(PYTHON) -m pip install virtualenv
|
$(PYTHON) -m pip install virtualenv
|
||||||
$(PYTHON) -m virtualenv venv
|
$(PYTHON) -m virtualenv venv
|
||||||
|
venv/bin/python -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf venv
|
@ -74,7 +74,5 @@ def is_web_server_started():
|
|||||||
print(f"Checking for port output: {p.stdout}")
|
print(f"Checking for port output: {p.stdout}")
|
||||||
sleep(.1) #We sleep to use less recourses
|
sleep(.1) #We sleep to use less recourses
|
||||||
if "LISTEN" in p.stdout.decode():
|
if "LISTEN" in p.stdout.decode():
|
||||||
print("Stdout is:", p.stdout)
|
|
||||||
os.system("/bin/bash")
|
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
12
trick_source/trick_gsetup/.gitignore
vendored
12
trick_source/trick_gsetup/.gitignore
vendored
@ -1,12 +0,0 @@
|
|||||||
*__pycache__*
|
|
||||||
.vscode/*
|
|
||||||
config.log
|
|
||||||
config.status
|
|
||||||
share/trick/makefiles/config_user.mk
|
|
||||||
*.json
|
|
||||||
!tests/config_for_test_app_with_file.json
|
|
||||||
build/*
|
|
||||||
main
|
|
||||||
main.spec
|
|
||||||
*practice*
|
|
||||||
*.cache
|
|
@ -1,117 +0,0 @@
|
|||||||
`configure' configures Trick 17+ to adapt to many kinds of systems.
|
|
||||||
|
|
||||||
Usage: ../git/trick/configure [OPTION]... [VAR=VALUE]...
|
|
||||||
|
|
||||||
To assign environment variables (e.g., CC, CFLAGS...), specify them as
|
|
||||||
VAR=VALUE. See below for descriptions of some of the useful variables.
|
|
||||||
|
|
||||||
Defaults for the options are specified in brackets.
|
|
||||||
|
|
||||||
Configuration:
|
|
||||||
-h, --help display this help and exit
|
|
||||||
--help=short display options specific to this package
|
|
||||||
--help=recursive display the short help of all the included packages
|
|
||||||
-V, --version display version information and exit
|
|
||||||
-q, --quiet, --silent do not print `checking ...' messages
|
|
||||||
--cache-file=FILE cache test results in FILE [disabled]
|
|
||||||
-C, --config-cache alias for `--cache-file=config.cache'
|
|
||||||
-n, --no-create do not create output files
|
|
||||||
--srcdir=DIR find the sources in DIR [configure dir or `..']
|
|
||||||
|
|
||||||
Installation directories:
|
|
||||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
|
||||||
[/usr/local]
|
|
||||||
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
|
||||||
[PREFIX]
|
|
||||||
|
|
||||||
By default, `make install' will install all the files in
|
|
||||||
`/usr/local/bin', `/usr/local/lib' etc. You can specify
|
|
||||||
an installation prefix other than `/usr/local' using `--prefix',
|
|
||||||
for instance `--prefix=$HOME'.
|
|
||||||
|
|
||||||
For better control, use the options below.
|
|
||||||
|
|
||||||
Fine tuning of the installation directories:
|
|
||||||
--bindir=DIR user executables [EPREFIX/bin]
|
|
||||||
--sbindir=DIR system admin executables [EPREFIX/sbin]
|
|
||||||
--libexecdir=DIR program executables [EPREFIX/libexec]
|
|
||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
|
||||||
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
|
|
||||||
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
|
|
||||||
--infodir=DIR info documentation [DATAROOTDIR/info]
|
|
||||||
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
|
|
||||||
--mandir=DIR man documentation [DATAROOTDIR/man]
|
|
||||||
--docdir=DIR documentation root [DATAROOTDIR/doc/trick]
|
|
||||||
--htmldir=DIR html documentation [DOCDIR]
|
|
||||||
--dvidir=DIR dvi documentation [DOCDIR]
|
|
||||||
--pdfdir=DIR pdf documentation [DOCDIR]
|
|
||||||
--psdir=DIR ps documentation [DOCDIR]
|
|
||||||
|
|
||||||
X features:
|
|
||||||
--x-includes=DIR X include files are in DIR
|
|
||||||
--x-libraries=DIR X library files are in DIR
|
|
||||||
|
|
||||||
System types:
|
|
||||||
--build=BUILD configure for building on BUILD [guessed]
|
|
||||||
--host=HOST cross-compile to build programs to run on HOST [BUILD]
|
|
||||||
|
|
||||||
Optional Features:
|
|
||||||
--disable-option-checking ignore unrecognized --enable/--with options
|
|
||||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
|
||||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
|
||||||
--enable-32bit Force Trick and sims to compile 32bit
|
|
||||||
--enable-offline Compile Trick in offline mode. Un-tar the
|
|
||||||
trick-offline directory in TRICK_HOME to use this
|
|
||||||
feature
|
|
||||||
--enable-mongoose Compile Trick with webserver capabilites.
|
|
||||||
--enable-java use java (default is yes)
|
|
||||||
--enable-er7utils use er7_utils (default is yes)
|
|
||||||
|
|
||||||
Optional Packages:
|
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
|
||||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
|
||||||
--with-x use the X Window System
|
|
||||||
--with-python[=DIR] python root directory
|
|
||||||
--without-prepend-path do not prepend to path (this is default)
|
|
||||||
--with-prepend-path[=DIR]
|
|
||||||
specify a directory to prepend to PATH (default is
|
|
||||||
/usr/local/bin)
|
|
||||||
--with-swig[=DIR] path of directory containing the SWIG executable.
|
|
||||||
--with-llvm[=DIR] LLVM root directory
|
|
||||||
--with-zlib=DIR root directory path of zlib installation [defaults to
|
|
||||||
/usr/local or /usr if not found in /usr/local]
|
|
||||||
--without-zlib to disable zlib usage completely
|
|
||||||
--with-udunits[=DIR] UDUnits root directory
|
|
||||||
--with-hdf5[=DIR] HDF5 root directory
|
|
||||||
--with-dmtcp[=DIR] DMTCP root directory
|
|
||||||
--with-tpro[=DIR] TPRO root directory
|
|
||||||
--with-bc635[=DIR] BC635 root directory
|
|
||||||
--with-gsl[=DIR] GSL root directory
|
|
||||||
--with-gtest[=DIR] GTEST root directory
|
|
||||||
|
|
||||||
Some influential environment variables:
|
|
||||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
|
||||||
CXX C++ compiler command
|
|
||||||
CXXFLAGS C++ compiler flags
|
|
||||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
|
||||||
nonstandard directory <lib dir>
|
|
||||||
LIBS libraries to pass to the linker, e.g. -l<library>
|
|
||||||
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
|
||||||
you have headers in a nonstandard directory <include dir>
|
|
||||||
CXXCPP C++ preprocessor
|
|
||||||
CC C compiler command
|
|
||||||
CFLAGS C compiler flags
|
|
||||||
JAVA_CC java compiler command
|
|
||||||
JAVA_CC_FLAGS
|
|
||||||
java compiler flags
|
|
||||||
CPP C preprocessor
|
|
||||||
|
|
||||||
Use these variables to override the choices made by `configure' or to help
|
|
||||||
it to find libraries and programs with nonstandard names/locations.
|
|
||||||
|
|
||||||
Report bugs to the package provider.
|
|
@ -1,59 +0,0 @@
|
|||||||
from os import EX_CANTCREAT
|
|
||||||
import json
|
|
||||||
from pprint import pprint
|
|
||||||
import os
|
|
||||||
|
|
||||||
def write_help(program):
|
|
||||||
os.system(f"{program} --help > help.txt")
|
|
||||||
|
|
||||||
def load():
|
|
||||||
with open("help.txt", "r") as f:
|
|
||||||
sections = {}
|
|
||||||
section = None
|
|
||||||
for line in f:
|
|
||||||
if line.endswith(":\n"):
|
|
||||||
section = line[:-1]
|
|
||||||
sections[section] = []
|
|
||||||
elif section is not None and line != "\n":
|
|
||||||
try:
|
|
||||||
argIndex = line.index("--") #TODO: Add env var
|
|
||||||
helpIndex = line.index(" ", argIndex)
|
|
||||||
sections[section].append((line[argIndex:helpIndex], line[helpIndex:].strip()))
|
|
||||||
except:
|
|
||||||
print("Invalid line:", line)
|
|
||||||
myJson = {
|
|
||||||
"sections" : {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for section in sections:
|
|
||||||
myJson["sections"][section] = {
|
|
||||||
"options" : {}
|
|
||||||
}
|
|
||||||
for t in sections[section]:
|
|
||||||
arg = t[0]
|
|
||||||
help = t[1]
|
|
||||||
try:
|
|
||||||
s = arg.split("=")
|
|
||||||
arg = s[0]
|
|
||||||
if "=" in arg:
|
|
||||||
continue
|
|
||||||
type = s[1]
|
|
||||||
if "DIR" in type:
|
|
||||||
type = "dir"
|
|
||||||
except:
|
|
||||||
type = "flag"
|
|
||||||
# print(arg, "=", type, ":", help)
|
|
||||||
if type in ("dir", "bool", "flag"):
|
|
||||||
if arg[-1] == "[":
|
|
||||||
arg = arg[:-1]
|
|
||||||
myJson["sections"][section]["options"][arg[2:]] = {
|
|
||||||
# "section": section,
|
|
||||||
"type": type,
|
|
||||||
"desc":help
|
|
||||||
}
|
|
||||||
else:
|
|
||||||
print("unuported type:", type)
|
|
||||||
|
|
||||||
with open("config.json", "w") as f:
|
|
||||||
f.write(json.dumps(myJson, indent=4))
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
@ -1,6 +0,0 @@
|
|||||||
import subprocess
|
|
||||||
|
|
||||||
def run(program):
|
|
||||||
print("Running:", program)
|
|
||||||
process = subprocess.run(program.split(" "), capture_output=True)
|
|
||||||
return process
|
|
Loading…
Reference in New Issue
Block a user