Skip to content

Commit 86e2575

Browse files
committed
6.9.3
Version 6.9.3
1 parent 5f3ac9f commit 86e2575

File tree

7 files changed

+70
-49
lines changed

7 files changed

+70
-49
lines changed

doxygen/history.dox

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/**
22
@page history Revision History
33

4+
@section qtools_6_9_3 Version 6.9.3, 2021-04-09
5+
6+
47

58
@section qtools_6_9_2 Version 6.9.2, 2021-01-18
69

doxygen/qutest.dox

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ Unlike other existing unit testing harnesses for embedded systems (e.g., <a href
7878
Even though QUTest&trade; is particularly suitable for running tests on deeply embedded targets, it also fully supports running *the same* tests on your **host computer** (Windows, Linux, and MacOS are supported). In fact, running the tests as much as possible on the host and thus avoiding the target-hardware bottleneck is the highly recommended best-practice of embedded TDD. QUTest&trade; supports **fully-automated** unit testing, both on the embedded target and on the host computer.
7979

8080

81-
8281
@section qutest_use Installation &amp; Use
8382
The <span class="img file_py">qutest.py</span> script can be used standalone, without any installation in your Python system (see @ref qutest_run below).
8483

@@ -114,13 +113,18 @@ qutest [-x] [test-scripts] [host_exe] [qspy_host[:udp_port]] [qspy_tcp_port]
114113

115114
- `test_scripts` - optional specification of the Python test scripts to run. If not specified, qutest will try to run all *.py files in the current directory as test scripts
116115

117-
- `host_exe | DEBUG` - optional specification of the test-fixture compiled for the host (host executable) for testing on the host computer. The special value DEBUG means that qutest will run in the "debug mode", in which it will NOT launch the host executables and it will wait for the Target reset and other responses from the Target. If host_exe is not specified, an embedded target is assumed (which is loaded with the test fixture already).
116+
- `host_exe | "" | DEBUG` - optional specification of the test-fixture compiled for the host (host executable) for testing on the host computer. The placeholder value `""` (empty string) can be used for running test fixtures on an embedded Target. The special value DEBUG means that qutest will run in the "debug mode", in which it will NOT launch the host executables and it will wait for the Target reset and other responses from the Target. If host_exe is not specified, an embedded target is assumed (which is loaded with the test fixture already).
118117

119118
- `qspy_host[:udp_port]` - optional host-name/IP-address:port for the host running the QSPY host utility. If not specified, the default is 'localhost:7701'.
120119

121120
- `tcp_port`- optional the QSpy TCP port number for connecting host executables. If not specified, the default is `6601`.
122121

123122

123+
@note
124+
The command-line options for `qutest.py` are **positional**, meaning that an option must be at the specific position in the command-line to be parsed correctly. For example, if you wish to run QUTest on an embedded target at the specified `[qspy_host]` host-name, you still need to provide a placeholder for the host executable `[host_exe]` ("") option, to get to the right position for the `[qspy_host]` option.
125+
126+
127+
124128
@subsection qutest_exa Examples
125129

126130
<span class="logo logo_win">Windows Hosts</span>
@@ -143,6 +147,12 @@ python3 %QTOOLS%\qutest\qutest.py *.py build\dpp.exe
143147

144148
runs the test scripts (`*.py`) in the current directory and uses the host executable: `build\dpp.exe`
145149

150+
@verbatim
151+
python3 %QTOOLS%\qutest\qutest.py *.py "" 192.168.1.100:7705
152+
@endverbatim
153+
154+
runs the test scripts (`*.py`) in the current directory, without a host executable: (`""`), and connects to QSPY at `192.168.1.100:7705`
155+
146156
@verbatim
147157
qutest *.py build\dpp.exe 192.168.1.100:7705
148158
@endverbatim
@@ -176,6 +186,12 @@ python3 $(QTOOLS)/qutest/qutest.py *.py build/dpp
176186

177187
runs the test scripts (`*.py`) in the current directory and uses the host executable: `build/dpp`
178188

189+
@verbatim
190+
python3 $(QTOOLS)/qutest/utest.py *.py "" 192.168.1.100:7705
191+
@endverbatim
192+
193+
runs the test scripts (`*.py`) in the current directory, without a host executable: (`""`), and connects to QSPY at `192.168.1.100:7705`
194+
179195
@verbatim
180196
qutest *.py build/dpp 192.168.1.100:7705
181197
@endverbatim

qclean/source/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ int main(int argc, char *argv[]) {
313313
char const *rootDir = ".";
314314
int optChar;
315315

316-
PRINTF_S("%s", "QClean " VERSION " Copyright (c) 2005-2020 Quantum Leaps\n"
316+
PRINTF_S("%s", "QClean " VERSION " Copyright (c) 2005-2021 Quantum Leaps\n"
317317
"Documentation: https://www.state-machine.com/qtools/qclean.html\n");
318318
PRINTF_S("%s", "Usage: qclean [root-dir] [options]\n"
319319
" root-dir root directory for recursive cleanup (default is .)\n"

qspy/include/qspy.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* @ingroup qpspy
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.9.2
8-
* Last updated on 2021-01-15
7+
* Last updated for version 6.9.3
8+
* Last updated on 2021-02-24
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
@@ -40,7 +40,7 @@
4040
#ifndef QSPY_H
4141
#define QSPY_H
4242

43-
#define QSPY_VER "6.9.2"
43+
#define QSPY_VER "6.9.3"
4444

4545
#ifdef __cplusplus
4646
extern "C" {
@@ -176,28 +176,28 @@ extern QSPY_LastOutput QSPY_output;
176176

177177
void QSPY_onPrintLn(void); /* callback to print the last line of output */
178178

179-
#define SNPRINTF_LINE(format_, ...) do { \
180-
int n_ = SNPRINTF_S(&QSPY_output.buf[QS_LINE_OFFSET], \
181-
(QS_LINE_LEN_MAX - QS_LINE_OFFSET), \
182-
format_, ##__VA_ARGS__); \
183-
if ((0 < n_) && (n_ < QS_LINE_LEN_MAX - QS_LINE_OFFSET)) {\
184-
QSPY_output.len = n_; \
185-
} \
186-
else { \
187-
QSPY_output.len = QS_LINE_LEN_MAX - QS_LINE_OFFSET; \
188-
} \
179+
#define SNPRINTF_LINE(format_, ...) do { \
180+
int n_ = SNPRINTF_S(&QSPY_output.buf[QS_LINE_OFFSET], \
181+
(QS_LINE_LEN_MAX - QS_LINE_OFFSET), \
182+
format_, ##__VA_ARGS__); \
183+
if ((0 < n_) && (n_ < QS_LINE_LEN_MAX - QS_LINE_OFFSET)) { \
184+
QSPY_output.len = n_; \
185+
} \
186+
else { \
187+
QSPY_output.len = QS_LINE_LEN_MAX - QS_LINE_OFFSET; \
188+
} \
189189
} while (0)
190190

191191
#define SNPRINTF_APPEND(format_, ...) do { \
192192
int n_ = SNPRINTF_S(&QSPY_output.buf[QS_LINE_OFFSET + QSPY_output.len],\
193-
(QS_LINE_LEN_MAX - QS_LINE_OFFSET - QSPY_output.len), \
193+
(QS_LINE_LEN_MAX - QS_LINE_OFFSET - QSPY_output.len), \
194194
format_, ##__VA_ARGS__); \
195195
if ((0 < n_) \
196-
&& (n_ < QS_LINE_LEN_MAX - QS_LINE_OFFSET - QSPY_output.len)) { \
196+
&& (n_ < QS_LINE_LEN_MAX - QS_LINE_OFFSET - QSPY_output.len)) { \
197197
QSPY_output.len += n_; \
198198
} \
199199
else { \
200-
QSPY_output.len = QS_LINE_LEN_MAX - QS_LINE_OFFSET; \
200+
QSPY_output.len = QS_LINE_LEN_MAX - QS_LINE_OFFSET; \
201201
} \
202202
} while (0)
203203

qspy/source/main.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup qpspy
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.9.1
8-
* Last updated on 2020-09-15
7+
* Last updated for version 6.9.3
8+
* Last updated on 2021-04-04
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -80,9 +80,10 @@ static int l_bePort = 7701; /* default UDP port */
8080
static int l_tcpPort = 6601; /* default TCP port */
8181
static int l_baudRate = 115200; /* default serial baudrate */
8282

83-
#define INTRO_STR "QSPY %s Copyright (c) 2005-2020 Quantum Leaps\n" \
83+
static char const l_introStr[] = \
84+
"QSPY %s Copyright (c) 2005-2021 Quantum Leaps\n" \
8485
"Documentation: https://www.state-machine.com/qtools/qspy.html\n" \
85-
"Current timestamp: %s\n"
86+
"Current timestamp: %s\n";
8687

8788
static char const l_helpStr[] =
8889
"Usage: qspy [options] <arg> = required, [arg] = optional\n"
@@ -263,11 +264,6 @@ void QSPY_onPrintLn(void) {
263264

264265
QSPY_output.type = REG_OUT; /* reset for the next time */
265266
}
266-
/*..........................................................................*/
267-
void QSPY_printInfo(void) {
268-
QSPY_output.type = INF_OUT; /* this is an internal info message */
269-
QSPY_onPrintLn();
270-
}
271267

272268
/*..........................................................................*/
273269
static QSpyStatus configure(int argc, char *argv[]) {
@@ -278,9 +274,9 @@ static QSpyStatus configure(int argc, char *argv[]) {
278274
QSpyConfig config = {
279275
.version = 660U,
280276
.endianness = 0U,
281-
.tstampSize = 4U,
282277
.objPtrSize = 4U,
283278
.funPtrSize = 4U,
279+
.tstampSize = 4U,
284280
.sigSize = 2U,
285281
.evtSize = 2U,
286282
.queueCtrSize = 1U,
@@ -297,7 +293,7 @@ static QSpyStatus configure(int argc, char *argv[]) {
297293
STRNCPY_S(l_dicFileName, sizeof(l_dicFileName), "OFF");
298294

299295
STRNCPY_S(l_tstampStr, sizeof(l_tstampStr), QSPY_tstampStr());
300-
PRINTF_S(INTRO_STR, QSPY_VER, l_tstampStr);
296+
PRINTF_S(l_introStr, QSPY_VER, l_tstampStr);
301297

302298
STRNCPY_S(l_inpFileName, sizeof(l_inpFileName), "qs.bin");
303299
#ifdef _WIN32
@@ -539,7 +535,7 @@ static QSpyStatus configure(int argc, char *argv[]) {
539535
if (l_outFileName[0] != 'O') { /* "OFF" ? */
540536
FOPEN_S(l_outFile, l_outFileName, "w");
541537
if (l_outFile != (FILE *)0) {
542-
FPRINTF_S(l_outFile, INTRO_STR, QSPY_VER, l_tstampStr);
538+
FPRINTF_S(l_outFile, l_introStr, QSPY_VER, l_tstampStr);
543539
}
544540
else {
545541
PRINTF_S(" <QSPY-> Cannot open File=%s\n", l_outFileName);
@@ -670,7 +666,7 @@ bool QSPY_command(uint8_t cmdId) {
670666
"qspy%s.txt", l_tstampStr);
671667
FOPEN_S(l_outFile, l_outFileName, "w");
672668
if (l_outFile != (FILE *)0) {
673-
FPRINTF_S(l_outFile, INTRO_STR, QSPY_VER,
669+
FPRINTF_S(l_outFile, l_introStr, QSPY_VER,
674670
l_tstampStr);
675671
}
676672
else {

qspy/source/qspy.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup qpspy
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.9.1
8-
* Last updated on 2020-09-10
7+
* Last updated for version 6.9.3
8+
* Last updated on 2021-04-04
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -2287,6 +2287,11 @@ void QSPY_stop(void) {
22872287
QSPY_configSeqFile((void *)0);
22882288
}
22892289
/*..........................................................................*/
2290+
void QSPY_printInfo(void) {
2291+
QSPY_output.type = INF_OUT; /* this is an internal info message */
2292+
QSPY_onPrintLn();
2293+
}
2294+
/*..........................................................................*/
22902295
void QSPY_printError(void) {
22912296
QSPY_output.type = ERR_OUT; /* this is an error message */
22922297
QSPY_onPrintLn();

qwin/bsp_win32.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/*****************************************************************************
22
* Product: BSP for QWIN GUI demo
3-
* Last updated for version 5.6.5
4-
* Last updated on 2016-06-04
3+
* Last updated for version: 6.9.3
4+
* Date of the Last Update: 2021-03-03
55
*
6+
* Q u a n t u m L e a P s
7+
* ------------------------
8+
* Modern Embedded Software
69
*
7-
* Q u a n t u m L e a P s
8-
* ---------------------------
9-
* innovating embedded systems
10-
*
11-
* Copyright (C) Quantum Leaps, LLC. All rights reserved.
10+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1211
*
1312
* This program is open source software: you can redistribute it and/or
1413
* modify it under the terms of the following MIT License (MIT).
@@ -32,8 +31,8 @@
3231
* DEALINGS IN THE SOFTWARE.
3332
*
3433
* Contact information:
35-
* https://state-machine.com
36-
34+
* <www.state-machine.com/licensing>
35+
3736
*****************************************************************************/
3837
#include <stdint.h>
3938

@@ -172,21 +171,23 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
172171
return 0;
173172
}
174173

175-
/* commands from regular buttons and menus... */
174+
/* commands from child controls and menus... */
176175
case WM_COMMAND: {
177-
SetFocus(hWnd);
178176
switch (wParam) {
179177
case IDOK:
180178
case IDCANCEL: {
181179
PostQuitMessage(0);
182-
180+
break;
181+
}
182+
case IDC_USER: { /* owner-drawn button(s) */
183+
SetFocus(hWnd);
183184
break;
184185
}
185186
}
186187
return 0;
187188
}
188189

189-
/* owner-drawn buttons... */
190+
/* drawing of owner-drawn buttons... */
190191
case WM_DRAWITEM: {
191192
LPDRAWITEMSTRUCT pdis = (LPDRAWITEMSTRUCT)lParam;
192193
switch (pdis->CtlID) {

0 commit comments

Comments
 (0)