Skip to content

Update Python script#3887

Merged
opencv-pushbot merged 2 commits intoopencv:masterfrom
microsoft:update_py_script
Apr 1, 2015
Merged

Update Python script#3887
opencv-pushbot merged 2 commits intoopencv:masterfrom
microsoft:update_py_script

Conversation

@EvgenyAgafonchikov
Copy link
Copy Markdown
Contributor

  1. Fixing help messages

    Message shown by the --help option and message shown while starting run.py w/o (or with wrong) parameters are different, e. g. w/ and w/o "[build_path]" in the end. As "build_path" is required, removing square brackets.

  2. Extending functionality:

Developer may wish to back up some test binaries to compare their behavior with modified version later or just pass current version to QA team.

Expected: can start from backed up sources using run.py script

Actual: run.py looks for an old binaries path from CMakeCache.txt and tests are used from the old location (if exists)

Adding of --move_tests option allows to specify new location, create back up and run tests from it. Command line should look like the following:

>> run.py --move_tests "new location" "current location"

This command copies test binaries and CMakeCache.txt file (that file is required by the script) and updates CMakeCache.txt with a new binaries path value.

After that you may start run.py for the new location with "Expected" result

@EvgenyAgafonchikov
Copy link
Copy Markdown
Contributor Author

Also, I'd like to suggest updating of this help page http://code.opencv.org/projects/opencv/wiki/HowToUsePerfTests with the following:

<...>
Creating of usable tests backup with run.py
Script run.py with --move_tests option may be used to create runnable backup of the tests built.

Usage exapmles:

cd opecv/build
run.py --move_tests "new tests location" "current tests binaries location"

This copies tests binaries and CMakeCache.txt (run.py make use of this file) and also updates CMakeCache.txt with the proper binaries path

@EvgenyAgafonchikov
Copy link
Copy Markdown
Contributor Author

Hi, could you please to look into the build failure described below?

Received Docs build failure while build portal was unavailable on the web.

Failure step: "Merge opencv with test branch"; Link

Logs: "fatal: unable to access 'https://github.com/MSOpenTech/opencv.git/': SSLRead() return error -9806"; Link

Was it portal or git failure? If so, could you please restart the build?

@EvgenyAgafonchikov
Copy link
Copy Markdown
Contributor Author

Updating of the PR triggered rebuild and builds are green now

@mkostin
Copy link
Copy Markdown
Contributor

mkostin commented Mar 30, 2015

👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build_path is still optional parameter with '.' default value (script is lauched from the binary directory). So please keep [build_path] in help descriptions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alalek However, it is not obvious and such help message may be confusing for user who is not familiar with run.py code when he is starting script from location other then binary directory

@alalek
Copy link
Copy Markdown
Member

alalek commented Mar 30, 2015

General note:
Did you try to solve problem of test package creation via CMake "install" target? It is a general/natural way to create binary packages (with or without tests) on all platforms.

@EvgenyAgafonchikov
Copy link
Copy Markdown
Contributor Author

@alalek In case of using install directory out of OCV build structure (no CMakeCache.txt on the upper levels) run.py cannot start the tests.
Even if we update install target with CMakeCache.txt file copying and path updating, user will need to rerun CMake with the new path, rebuild projects and execute install target to create new version in another location

--help message and starting run.py w/o parameters generate different messages

E. g. w/ and w/o build_path in the end

build_path is required, removing square brackets
@EvgenyAgafonchikov EvgenyAgafonchikov force-pushed the update_py_script branch 2 times, most recently from d7f56ec to 14346eb Compare March 31, 2015 15:32
@mkostin
Copy link
Copy Markdown
Contributor

mkostin commented Mar 31, 2015

ABI incompatibility looks the same as we had here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that error message is missed here (like "Specify build_path or run script from CMake build directory")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alalek Updated this part and OptionParser message with details concerning of the build_path

@alalek
Copy link
Copy Markdown
Member

alalek commented Mar 31, 2015

Right, run.py is unable to launch tests from the install binary packages.

This allows to start run.py with --move_tests parameter to place tests

to another location and keep them runnable from there
@alalek
Copy link
Copy Markdown
Member

alalek commented Apr 1, 2015

Thanks!
👍

@opencv-pushbot opencv-pushbot merged commit ae090fe into opencv:master Apr 1, 2015
apavlenko pushed a commit to apavlenko/opencv that referenced this pull request Apr 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants