|
Post by ahartmann on Aug 26, 2013 5:38:28 GMT -5
Hi Martin,
first of all, thanks for this product! From the (really great!) user manual, it looks very promising to me.
I'd like to test the examples, but I got some problems here.
1. Visual Studio is installed in "C:\Program Files (x86)\Microsoft Visual Studio 10.0" under Windows 7 x64. You should add this path (with the " (x86)") to the samples.cmd file.
2. I got build (linker) errors and I'm unsure what to do. Any help is appreciated.
Thanks in advance!
Best regards, André
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples>nmake
Microsoft (R) Program Maintenance Utility, Version 10.00.30319.01 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
testape cl /Zi sample1.c calc.c add.c testape.lib TestApe instrumentation tool, release r880-Dec-03-2011-windows. Unit testing for embedded software - http://testape.com
_____________ ------ OOO ---- ++ ,,, ++ (o_o)** (_)** ** + *+ + . ++ () oo () oo oo
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 16.00.40219.01 für 80x8
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /Zi sample1.c calc.c add.c testape.lib /link /entry:main
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 16.00.40219.01 für 80x8
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /Zi sample1.c calc.c add.c testape.obj testape.lib
sample1.c calc.c add.c Code wird generiert... Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.
/out:sample1.exe /debug sample1.obj calc.obj add.obj testape.obj testape.lib calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_divid" in Funktion "_calculate". calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_multily" in Funktion "_calculate". calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_subtrct" in Funktion "_calculate". testape.lib(testape_main.obj) : error LNK2019: Verweis auf nicht aufgelöstes exernes Symbol "_testape_validate_fp_accuracy" in Funktion "_main_worker". testape.lib(testape_main.obj) : error LNK2019: Verweis auf nicht aufgelöstes exernes Symbol "_testape_error_handler" in Funktion "_main_worker". testape.lib(testape_main.obj) : error LNK2019: Verweis auf nicht aufgelöstes exernes Symbol "_testape_build_info" in Funktion "_main_worker". sample1.exe : fatal error LNK1120: 6 nicht aufgelöste externe Verweise. NMAKE : fatal error U1077: ""C:\Program Files (x86)\TestApe\testape.EXE"": Rückabe-Code "0x2" Stop.
|
|
|
Post by Martin Nielsen on Aug 27, 2013 13:35:01 GMT -5
Thanks for your positive feedback.
TestApe analyses the errors message in the output from the linker and since these are in German, they do not match the build in patterns.
Within a couple weeks I can make a beta version available, that understands the german messages.
Until then I propose that you change the language while compiling as a temporary workaround
Br, Martin
|
|
|
Post by ahartmann on Aug 27, 2013 15:21:13 GMT -5
Hi Martin, thanks for your answer. Well, f**k Microsoft. I will see how to switch to English messages. Please be aware, that you can run into locale problems when trying to parse non-English error messages. We have problems with German umlauts and also russian characters in the Qt Creator IDE also. In the discussion how to solve this, it turned out, that Microsoft nmake, compiler and linker can use different encodings on the same system: bugreports.qt-project.org/browse/QTCREATORBUG-316codereview.qt-project.org/#change,30405 Quote: "Yes, I have studied this problem. "Link.exe" writes in the OEM codepage, if stdout is a console device, in other cases (eg, pipe or file), the output codepage is ANSI." I just wanted to have you warned I will try to turn to English output and then report you if that works. You can then add an entry in the manual. By the way: The batch file could also print some short instructions when it is started. For people that don't always read manuals, like me
|
|
|
Post by Martin Nielsen on Sept 1, 2013 16:35:56 GMT -5
Hi André
A have made a new beta release, containing a correction that should allow TestApe to handle the German localization of the MS Compiler.
Thanks for the hints about this complicated issue and the proposals on how to improve the batch files.
Br, Martin
|
|
|
Post by ahartmann on Sept 2, 2013 8:50:30 GMT -5
Hi Martin,
many thanks for the new beta.
It seems to work, at least I was able to build and run sample one.
I too like the new "Try examples" command window! It works with VS 2010 on a 64 bit Windows system.
I really appreciate your adoptions to a German Visual Studio, as it turned out, that it's impossible to switch the compiler language to English on a localized Visual Studio.
Very impressive that it needs one man to beat one of the largest software companies in the world ;-)
I will try out TestApe a bit the next time. I'm new to unit testing and need to get an overview on what's possible first.
Once again, thank you very much! André
|
|
|
Post by ahartmann on Sept 3, 2013 8:37:02 GMT -5
Hi Martin,
Sorry, once again bad news: It still seems to fail.
As soon as a VALIDATE occurs in the test-executeable, linking fails again.
It discovered this while trying my own tests with VALIDATE_STRING.
Best regards, André
PS: The forum sometimes seems to have problems with German umlauts too.
_____________ ------ OOO ---- ++ ,,, ++ (o_o)** (_)** ** + *+ + . ++ () oo () oo oo
Welcome to TestApe live sample terminal. Here you can try samples from the testape documentation.
Run 'nmake sample1' to try first example Setting environment for using Microsoft Visual Studio 2010 x86 tools.
C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples>nmake sample2
Microsoft (R) Program Maintenance Utility, Version 10.00.30319.01 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
testape cl /Zi sample2.c calc.c add.c testape.lib TestApe instrumentation tool, release -Sep-01-2013-windows. Unit testing for embedded software - http://testape.com
_____________ ------ OOO ---- ++ ,,, ++ (o_o)** (_)** ** + *+ + . ++ () oo () oo oo
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 16.00.40219.01 für 80x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /Zi sample2.c calc.c add.c testape.lib /link /entry:main
Analyzing ... Generating default mocks -> divide multiply subtract Generating hooks -> None
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 16.00.40219.01 für 80x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
sample2.c calc.c add.c Code wird generiert... Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.
/out:sample2.exe /debug sample2.obj calc.obj add.obj testape.lib calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_divide" in Funktion "_calculate". calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_multiply" in Funktion "_calculate". calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_subtract" in Funktion "_calculate". testape.lib(testape_validate.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_testape_error_handler" in Funktion "_testape_validate_int". testape.lib(testape_main.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "_testape_error_handler". testape.lib(testape_validate.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_testape_validate_fp_accuracy" in Funktion "_testape_validate_fp". testape.lib(testape_main.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "_testape_validate_fp_accuracy". testape.lib(testape_main.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_testape_build_info" in Funktion "_main_worker". sample2.exe : fatal error LNK1120: 6 nicht aufgelöste externe Verweise. NMAKE : fatal error U1077: ""C:\Program Files (x86)\TestApe\testape.EXE"": Rückgabe-Code "0x2" Stop.
|
|
|
Post by Martin Nielsen on Sept 3, 2013 13:29:07 GMT -5
Hi
This time it is something else :-)
In the first output command line was
cl /Zi sample1.c calc.c add.c testape.obj testape.lib in the second output commandline was
cl /Zi sample2.c calc.c add.c testape.lib /link /entry:main
testape.obj is missing
testape.obj contains exactly the function that it is complaining about later. So, for one reason or the other, it could not generate testape.c and testape.obj. The default behaviour is the to fall through to pass through linking. Admittet, a proper error message might have made this easier to spot :-)
Could these and other temporary files be locked ? Do the user have access to create/remove these files in this directory ?
Try and run nmake clean or remove them manually.
Br, Martin
|
|
|
Post by ahartmann on Sept 4, 2013 0:26:53 GMT -5
Hi Martin, * It seems I have write access to this directory as some obj files are generated * I cleaned up everything before trying again So the expected behavior would be, that a testape.c is generated and compiled to testape.obj? Didn't work Many thanks for your support! Welcome to TestApe live sample terminal. Here you can try samples from the testape documentation.
Run 'nmake sample1' to try first example Setting environment for using Microsoft Visual Studio 2010 x86 tools.
C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples>dir Volume in drive C has no label. Volume Serial Number is 44B5-7D30
Directory of C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples
04.09.2013 07:17 <DIR> . 04.09.2013 07:17 <DIR> .. 01.09.2013 23:31 58 add.c 01.09.2013 23:31 964 calc.c 01.09.2013 23:31 175 converter.c 01.09.2013 23:31 63 divide.c 01.09.2013 23:31 329 main.c 01.09.2013 23:31 2.874 makefile 01.09.2013 23:31 69 multiply.c 01.09.2013 23:31 169 sample1.c 01.09.2013 23:31 240 sample10.c 01.09.2013 23:31 527 sample11.c 01.09.2013 23:31 322 sample12.c 01.09.2013 23:31 479 sample13.c 01.09.2013 23:31 557 sample14.c 01.09.2013 23:31 1.315 sample15.c 01.09.2013 23:31 305 sample16.c 01.09.2013 23:31 703 sample17.c 01.09.2013 23:31 816 sample18.c 01.09.2013 23:31 206 sample19.c 01.09.2013 23:31 192 sample2.c 01.09.2013 23:31 437 sample20.c 01.09.2013 23:31 342 sample21.c 01.09.2013 23:31 531 sample22.c 01.09.2013 23:31 290 sample23.c 01.09.2013 23:31 453 sample24.c 01.09.2013 23:31 342 sample25.c 01.09.2013 23:31 432 sample26.c 01.09.2013 23:31 194 sample3.c 01.09.2013 23:31 207 sample4.c 01.09.2013 23:31 252 sample5.c 01.09.2013 23:31 383 sample6.c 01.09.2013 23:31 435 sample7.c 01.09.2013 23:31 445 sample8.c 01.09.2013 23:31 419 sample9.c 01.09.2013 23:31 65 subtract.c 34 File(s) 15.590 bytes 2 Dir(s) 121.082.499.072 bytes free
C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples>nmake sample2
Microsoft (R) Program Maintenance Utility, Version 10.00.30319.01 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
testape cl /Zi sample2.c calc.c add.c testape.lib TestApe instrumentation tool, release -Sep-01-2013-windows. Unit testing for embedded software - http://testape.com
_____________ ------ OOO ---- ++ ,,, ++ (o_o)** (_)** ** + *+ + . ++ () oo () oo oo
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 16.00.40219.01 für 80x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /Zi sample2.c calc.c add.c testape.lib /link /entry:main
Analyzing ... Generating default mocks -> divide multiply subtract Generating hooks -> None
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 16.00.40219.01 für 80x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
sample2.c calc.c add.c Code wird generiert... Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.
/out:sample2.exe /debug sample2.obj calc.obj add.obj testape.lib calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_divide" in Funktion "_calculate". calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_multiply" in Funktion "_calculate". calc.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_subtract" in Funktion "_calculate". testape.lib(testape_validate.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_testape_error_handler" in Funktion "_testape_validate_int". testape.lib(testape_main.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "_testape_error_handler". testape.lib(testape_validate.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_testape_validate_fp_accuracy" in Funktion "_testape_validate_fp". testape.lib(testape_main.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "_testape_validate_fp_accuracy". testape.lib(testape_main.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_testape_build_info" in Funktion "_main_worker". sample2.exe : fatal error LNK1120: 6 nicht aufgelöste externe Verweise. NMAKE : fatal error U1077: ""C:\Program Files\TestApe\testape.EXE"": Rückgabe-Code "0x2" Stop.
C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples>dir Volume in drive C has no label. Volume Serial Number is 44B5-7D30
Directory of C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples
04.09.2013 07:17 <DIR> . 04.09.2013 07:17 <DIR> .. 01.09.2013 23:31 58 add.c 04.09.2013 07:17 1.642 add.obj 01.09.2013 23:31 964 calc.c 04.09.2013 07:17 4.187 calc.obj 01.09.2013 23:31 175 converter.c 01.09.2013 23:31 63 divide.c 01.09.2013 23:31 329 main.c 01.09.2013 23:31 2.874 makefile 01.09.2013 23:31 69 multiply.c 01.09.2013 23:31 169 sample1.c 01.09.2013 23:31 240 sample10.c 01.09.2013 23:31 527 sample11.c 01.09.2013 23:31 322 sample12.c 01.09.2013 23:31 479 sample13.c 01.09.2013 23:31 557 sample14.c 01.09.2013 23:31 1.315 sample15.c 01.09.2013 23:31 305 sample16.c 01.09.2013 23:31 703 sample17.c 01.09.2013 23:31 816 sample18.c 01.09.2013 23:31 206 sample19.c 01.09.2013 23:31 192 sample2.c 04.09.2013 07:17 2.481 sample2.obj 04.09.2013 07:17 19.456 sample2.pdb 01.09.2013 23:31 437 sample20.c 01.09.2013 23:31 342 sample21.c 01.09.2013 23:31 531 sample22.c 01.09.2013 23:31 290 sample23.c 01.09.2013 23:31 453 sample24.c 01.09.2013 23:31 342 sample25.c 01.09.2013 23:31 432 sample26.c 01.09.2013 23:31 194 sample3.c 01.09.2013 23:31 207 sample4.c 01.09.2013 23:31 252 sample5.c 01.09.2013 23:31 383 sample6.c 01.09.2013 23:31 435 sample7.c 01.09.2013 23:31 445 sample8.c 01.09.2013 23:31 419 sample9.c 01.09.2013 23:31 65 subtract.c 04.09.2013 07:17 61.440 vc100.pdb 39 File(s) 104.796 bytes 2 Dir(s) 121.082.466.304 bytes free
C:\Users\ah.ISEG\AppData\Roaming\TestApe\Samples>
|
|
|
Post by Martin Nielsen on Sept 4, 2013 14:21:33 GMT -5
Hi André
Sorry for all the trouble - hope you have the energy to try one more time. Could you modify the makefile ( add the -o option ) like it is shown below
sample2: sample2.c calc.c add.c testape -o cl /Zi sample2.c calc.c add.c testape.lib sample2
and then run
nmake clean sample2
The instrumenter will skip the cleanup part and leave some temporary files. The interesting files are
testape.c testape.err testape.log testape_prelink_args testape_prelink_result
If you could zip and send them to martin[at]testape.com, then perhaps I can understand what is going on
Br, Martin
|
|
|
Post by Martin Nielsen on Sept 5, 2013 15:48:05 GMT -5
Hi André Thanks for the files - looking at them, it was pretty obvious that I did not make a proper test for this (shame on me ) I now have a full test for german output in my regression test suite for testape. Now it MUST work :-) new beta is on the site Br, Martin
|
|
|
Post by ahartmann on Sept 6, 2013 7:38:56 GMT -5
Hi Martin,
I have good news for you.
I've tried sample1 to sample3 from your Examples and a small test I wrote myself: All four are working now!
I'd like to thank you very much for your great support and I will now dig deeper in the area of unit testing.
Best regards, André
|
|