Running QTests from CLion - qt

Is it possible to run all QTests from the CLion Test Runner?
I have a CMake file that creates one target per Test Class, which ends up in several test targets that I can run one by one from CLion, but I haven't figured out how to run them all at once.
CMake has the "test" target, which I can build with "make test" from the test directory, but this target is not listed in CLion.

Related

In a multi-project SBT build, how can I run 1 main program?

I have a multi-project build. One of my source directories is called "core" that unpacks down to the source files in normal project structure (main/scala/...)
Using the sbt command line, how can I run a main program called Hello.scala (object extends App)?
Tried:
> run my.package.path.Hello
> run Hello
> run
If you want to run some task scoped only to one subproject ("module"), you can do it with the project/task syntax, e.g.
core/run
See documentation on Scopes.

How to run sbt multiple command in interactive mode

I want to run several sbt-commands within sbt interactive mode, i.e. without leaving the sbt "shell"?
(Note:
Some questions answer how to pass argument to sbt-commands using sbt in the standard shell. Not what I wnat here)
Example: I am in sbt interactive shell, and I want to run "test:compile", then "test"
I know test will call required compilation, but in this example I want to run the compilation of all sub-projects, before any test is started.
To run commands sequentially within the sbt shell, use ; to chain commands:
> ;test:compile ;test
Note however that running the test task will compile your sources if necessary without you having to explicitly running the compile task.

Qt copying files

I'm using qt-opensource-windows-x86-mingw492-5.5.0 on two different machines.
My problem is when it comes to copying files after the build using the following command:
copyfiles.commands += #call xcopy /S /Y /I $${THIRDPARTY_PATH}\\ffmpeg\\Windows\\* $${DESTDIR_WIN}\\debug
My first machine has Visual Studio 2013 but i'm using mingw. This one properly uses the copyfiles.
On my second machine I dont have Visual Studio and when I run the build I get the following errors:
/usr/bin/sh: #call: command not found
I'm not sure why the same Qt install gives two different solutions. I looked at the build steps of the project and both project are the same.
Any ideas?
Your problem is most likely that you have a 'sh.exe' in your PATH on the second machine.
When generating Makefile's, qmake tries to be clever and determines whether it's running from Windows command line (cmd.exe), or from the Unix/Cygwin shell (sh.exe) by checking whether 'sh.exe' is in the current PATH. If it thinks it is running in a Unix shell it well generate a Makefile meant for mingw32-make, otherwise a Makefile meant for nmake.
This test is unfortunately pretty bogus nowadays, mostly because sh.exe is in part of the 'bin' directory of git on Windows. If this is your problem, and you're using git, just make sure that you include the 'cmd' directory of git instead.

How can i run robot test cases without ride using test suite

I am new to robot framework and wanted to see if i can run test cases without RIDE. I want to create test suite and run test cases sequentially without using RIDE. I went through documentation but could not understand it.
Ex: Test Suite
Test Case 1
Test Case 2
Test Case 3
i would like to put my references to all my resource files to test suite and run all test cases. I can do this using RIDE but wanted to know if i can do this without using it. Do i need to create batch file to do this or any other method to run? Any example will help me. Thank you for advance.
When you install robot, you also installed a program called robot (or pybot in older versions), which is the official robot test runner.
If you have a test suite named "my_tests.robot", you can open up a command prompt (bash on *nix, powershell or command.exe on windows) and type the following command (assuming that robot is in your PATH environment variable, which it probably is):
$ robot my_tests.robot
If you have a collection of suites in a folder, you can give pybot the name of the folder rather than the name of a test file.
To see a list of all robot command line options, use the --help option:
$ robot --help
For more information see Starting test execution in the robot framework users guide.
if you use sublime-text/bracket/Atom/Emacs/vim ... you also have some plug-in :
http://robotframework.org/#tools
Show the path of test suite
exmp: Location of my 'catiav6' test script_
cd C:\Users....\Desktop\catiav6
Run following command from cmd
For single test case:
pybot --test 'Name_of_single_test_case' 'Name_of_test_suite'
For all test cases:
pybot --test * 'Name_of_test_suite'

I want to build the Xcode in command line by enabling 'Generate test coverage files' and 'Instrument program flow'

I want to build the Xcode in command line by enabling 'Generate test coverage files' and 'Instrument program flow'
Since i want to do the code coverage from jenkins i want to set the 'Generate test coverage files' and 'Instrument program flow' of XCode to be enabled.
I know the GUI option where to set but i want to run from Terminal since from jenkins it will build thorough the command line
xcodebuild -workspace ../x.xcodeproj/project.xcworkspce -scheme y
then what should i give in the above command to enable the 'Generate test coverage files' and 'Instrument program flow'
Add .xcconfig file to your project with following content
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES
GCC_GENERATE_TEST_COVERAGE_FILES = YES
and run xcodebuild with -xcconfig flag passing it path to your config file

Resources