Skip to content

CommitTesting

PavelKryukov edited this page Sep 30, 2015 · 1 revision

Introduction

Suppose you got a positive code review results.

To merge some changes you've done with main trunk you must be sure that your code satisfies the following list of criteria

  1. Of course, it should be compilable with both Makefile and VCPROJ. See FuncSimBuild.
  2. Unit tests binaries must pass (exit without messages and with exit code zero) (see UnitTests)
  3. Funcsim full-run on simple_test.bin should finish without errors.
  4. Code guidelines should be satisfied. See CodingStyle.

NOTE Currently there is no automated enforcement of the rules before a commit, therefore it's a responsibility of every committer to stick to them. Anyway, if you would introduce any problems the next automated regular testing will reveal them and that wouldn't look good!

Automated check

To test your branch or working copy you can use the same test suite that is used for regular testing. The scripts are <svn_root>/tests/mdsp_test_suite.sh and <svn_root>/tests/run_msvs2008_test.cmd

Prerequisites

You must have the following things installed on your computer:

  • Windows - you should have CygWin packages gcc4 and subversion installed.
  • Linux - no special requirements. if you can fetch and build code manually then you will be able to run the script.

How to run

Linux/CygWin

  1. To test main trunk, run
bash mdsp_test_suite.sh test
  1. To test a branch, run
bash mdsp_test_suite.sh branch <branch-name>
  1. To test your working copy, run
bash mdsp_test_suite.sh this

Notes: 1. The last is designed to be run from <svn_root>/tests directory. In other cases it won't find your sources. It also cleans your Release build directories and rebuilds the code.

There is also another method of running the test:

bash mdsp_test_suite.sh mail

NOTE: This will attempt to send an email to mailing list with results of the test. It will require a password for the SMTP server access that is situated in a separate file.

Windows MSVS 2008

  1. To test main trunk, use
run_msvs2008_tests.cmd test
  1. To test your branch, use
run_msvs2008_tests.cmd branch <branchname>
  1. To test your working copy, run from <svn_root>/tests:
run_msvs2008_tests.cmd this

To test main trunk and send mail to mailing list, use

run_msvs2008_tests.cmd > testlog.txt

NOTE: you'll need SendEmail.exe installed and password file provided for the latter variant to work.

Clone this wiki locally