Skip to content

Commit 15b1a86

Browse files
committed
add post fullflowtest
1 parent 9766482 commit 15b1a86

File tree

6 files changed

+28
-12
lines changed

6 files changed

+28
-12
lines changed

.github/workflows/pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ jobs:
4040
run: |
4141
./tests/NerlnetFullFlowTest.sh
4242
timeout-minutes: 20
43+
- name: Post FullFlow test
44+
id: fullflowpost
45+
if: steps.fullflow.outcome == 'success'
46+
run: |
47+
./tests/NerlnetFullFlowTestPost.sh
48+
timeout-minutes: 5

src_erl/NerlnetApp/rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{apps, [nerlnetApp]}
99
]}.
1010
{base_dir, "/usr/local/lib/nerlnet-lib/NErlNet/build/rebar"}.
11-
{relx, [{release, {nerlnetApp, "1.4.3"}, [nerlnetApp,cowboy,jsx,kernel,stdlib,inets]},
11+
{relx, [{release, {nerlnetApp, "1.4.3"}, [nerlnetApp,cowboy,jsx,kernel,stdlib,inets,sasl,os_mon]},
1212
{dev_mode, true},
1313
{include_erts, true},
1414
%{include_src, true},

src_erl/NerlnetApp/src/Stats/stats.erl

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,26 @@ generate_stats_ets() -> %% sources, clients , routers , mainserver...
9898

9999
%% Starts the os_mon application if it is not already started.
100100
%% This is necessary for monitoring system performance.
101+
102+
start_apps_if_not_started(Apps) ->
103+
lists:foreach(fun(App) ->
104+
case lists:keymember(Apps, 1, application:which_applications()) of
105+
true ->
106+
ok; % Already running
107+
false ->
108+
case application:ensure_all_started(App) of
109+
{ok, _} -> ok;
110+
{error, {already_started, App}} -> ok;
111+
{error, Reason} -> {error, Reason}
112+
end
113+
end
114+
end, Apps).
115+
116+
101117
%% It also ensures that the sasl application is started, as os_mon depends on it.
102118
start_os_mon() ->
103-
% check if os_mon is already started
104-
case application:which_applications() of
105-
[{os_mon, _, _} | _] ->
106-
ok;
107-
_ -> % start sasl application
108-
{ok,[sasl]} = application:ensure_all_started(sasl),
109-
% start os_mon application
110-
{ok,[os_mon]} = application:ensure_all_started(os_mon)
111-
end,
112-
ok.
119+
Apps = [sasl, os_mon],
120+
start_apps_if_not_started(Apps).
113121

114122

115123
generate_performance_stats_ets() -> %% clients

src_erl/NerlnetApp/src/nerlnetApp.app.src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{applications,
77
[kernel,
88
stdlib,
9+
sasl,
910
cowboy
1011
]},
1112
{env,[]},

src_py/apiServer/experiment_flow_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def print_test(in_str : str , enable = True):
1919
TESTS_PATH = os.getenv('TESTS_PATH')
2020
TESTS_BASELINE_MODEL_STATS = os.getenv('TEST_BASELINE_MODEL_STATS')
2121
TEST_BASELINE_LOSS_MIN = os.getenv('TEST_BASELINE_LOSS_MIN')
22-
NERLNET_RUN_SCRIPT = "./NerlnetRun.sh --run-mode release"
22+
NERLNET_RUN_SCRIPT = "./NerlnetRun.sh --run-mode release > /tmp/nerlnet_run_log.txt 2>&1"
2323
NERLNET_RUN_STOP_SCRIPT = "./NerlnetRun.sh --run-mode stop"
2424
NERLNET_RUNNING_TIMEOUT_SEC = int(os.getenv('NERLNET_RUNNING_TIMEOUT_SEC'))
2525
TEST_DATASET_IDX = 2

tests/NerlnetFullFlowTestPost.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cat /tmp/nerlnet_run_log.txt

0 commit comments

Comments
 (0)