tfw build script failed before because of random spaces
This commit is contained in:
parent
75a9bbe316
commit
c5db9bae51
@ -19,8 +19,9 @@ while getopts ":htbr" arg; do
|
|||||||
cargo build 1>/dev/null 2>&1
|
cargo build 1>/dev/null 2>&1
|
||||||
cargo test 1>/dev/null 2>&1
|
cargo test 1>/dev/null 2>&1
|
||||||
cargo run -- -s 1>/dev/null 2>&1 &
|
cargo run -- -s 1>/dev/null 2>&1 &
|
||||||
echo Waiting on server to spin up && sleep 2
|
|
||||||
server=$!
|
server=$!
|
||||||
|
echo Waiting on server to spin up && sleep 2
|
||||||
|
|
||||||
export CARGO_BIN=$HOME/.cargo/bin/cargo
|
export CARGO_BIN=$HOME/.cargo/bin/cargo
|
||||||
python3 client-tests/client.py > 'test.log'
|
python3 client-tests/client.py > 'test.log'
|
||||||
kill -9 $server
|
kill -9 $server
|
||||||
|
@ -29,10 +29,10 @@ class Test:
|
|||||||
self.base = base
|
self.base = base
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __create_admin():
|
def __create_admin(cargo_path: str):
|
||||||
# /home/$user/.cargo/bin/cargo <- normally
|
# /home/$user/.cargo?!?jedi=0, /bin/cargo <- normally?!? (*_*key: Text*_*, default: _T) ?!?jedi?!?
|
||||||
# prolly some awful shit on pipes
|
# prolly some awful ?!?jedi=0, shit on pipes?!? (*_*key: Text*_*) ?!?jedi?!?
|
||||||
CARGO_BIN = os.getenv('CARGO_BIN')
|
CARGO_BIN = os.getenv(cargo_path)
|
||||||
raw_json = subprocess.run(f'{CARGO_BIN} run --release -- -c dev-test'.split(), text=True, capture_output=True)
|
raw_json = subprocess.run(f'{CARGO_BIN} run --release -- -c dev-test'.split(), text=True, capture_output=True)
|
||||||
#raw_json = raw_json_b[2:-1].replace('\\n', ' ').strip()
|
#raw_json = raw_json_b[2:-1].replace('\\n', ' ').strip()
|
||||||
return json.loads(raw_json.stdout)
|
return json.loads(raw_json.stdout)
|
||||||
@ -76,7 +76,7 @@ class Test:
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
worker = Test(create_admin=True)
|
worker = Test(create_admin=False)
|
||||||
|
|
||||||
# First the invites api gets some basic tests
|
# First the invites api gets some basic tests
|
||||||
worker.get('/invite/create')
|
worker.get('/invite/create')
|
||||||
|
Loading…
Reference in New Issue
Block a user