Skip to content

Commit 17bda94

Browse files
committed
Add generation tests for NXT to CI
1 parent 7cae144 commit 17bda94

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

.github/workflows/installer.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
- name: Run minimal Python interpeter tests in direct script mode
141141
run: |
142142
PATH="" $SHELL -c 'for i in "$GITHUB_WORKSPACE"/tests/*.qrs; do "$TWOD_EXEC_NAME" --generate-path "$i".py \
143-
--close -s 5 --script-path "$i".py -m script "$i"; done'
143+
--generate-mode python --close -s 5 --script-path "$i".py -m script "$i"; done'
144144
timeout-minutes: 15
145145

146146
- name: Run minimal Javascript interpeter tests as fields in .qrs (For backward compatibility)
@@ -154,3 +154,16 @@ jobs:
154154
PATH="" $SHELL -c 'for i in "$GITHUB_WORKSPACE"/tests/*.qrs; do "$PATCHER_NAME" -s "$i".py "$i" \
155155
&& "$TWOD_EXEC_NAME" --close -s 5 -m script "$i"; done'
156156
timeout-minutes: 5
157+
158+
- name: Run nxt generation tests
159+
run: |
160+
curl --output nxt_tests.7z "https://dl.trikset.com/edu/.solutions20200701/nxt_generation.7z"
161+
7z x nxt_tests.7z || 7za x nxt_tests.7z
162+
set -x
163+
for i in "$GITHUB_WORKSPACE"/nxt/*.qrs;
164+
do
165+
"$TWOD_EXEC_NAME" --generate-mode nxt --generate-path "$i".c --only-generate "$i"
166+
ls "$GITHUB_WORKSPACE"/nxt/
167+
cat "$i".c
168+
done
169+
timeout-minutes: 5

plugins/robots/checker/twoDModelRunner/runner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ bool Runner::generate(const QString &generatePath, const QString &generateMode)
108108
}
109109
}
110110
if (generateMode == "nxt") {
111-
qDebug() << action.action()->objectName();
112111
if (action.action()->objectName() == "generateCode") {
113112
emit action.action()->triggered();
114113
}

qrtranslations/fr/plugins/robots/twoDModelRunner_fr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ In background mode the session will be terminated just after the execution ended
9292
<context>
9393
<name>twoDModel::Runner</name>
9494
<message>
95-
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+240"/>
95+
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+239"/>
9696
<source>Robot console</source>
9797
<translation type="unfinished"></translation>
9898
</message>

qrtranslations/ru/plugins/robots/twoDModelRunner_ru.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ In background mode the session will be terminated just after the execution ended
9898
<context>
9999
<name>twoDModel::Runner</name>
100100
<message>
101-
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+240"/>
101+
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+239"/>
102102
<source>Robot console</source>
103103
<translation>Консоль робота</translation>
104104
</message>

0 commit comments

Comments
 (0)