Skip to content

Latest commit

 

History

History
 
 

auto-run-nondex

runNondex

This script runs individual modules in the specified project with the Nondex tool and shows results automatically in the markdown format.

Output file is located inside the project folder and called report_md.md The output would only contain tests that are detected by the nondex tool as flaky, and the result includes the seeds used for the test and the status of the test result.

All the log information would be stored inside the .runNondex folder inside the project.

Inside the .runNondex folder:

  • ./LOGSSS contains nondex logs for all submodules.
  • LOGresult contains a list of file paths that contain test errors.
  • htmlOutput contains a list of file paths for the HTML files generated by the nondex tool.

It is recommended to use a virtual python environment for the required modules:

python3 -m venv <path_to_the_new_virtual_environment>
source <path_to_the_new_virtual_environment>/bin/activate

Make sure to first install packages in requirements.txt.

# sudo apt install python3-pip
cd auto-run-nondex
pip install -r requirements.txt

runNondexUnderAuthor

This script runs all the valid repos under a given author using the runNondex script above.

The valid repo is defined as:

  1. This repo has not appeared in the latest pr-data.csv
  2. This repo contains pom.xml file.

Usage:

./runNondex.sh <project_folder_path> <optional-directory-name>
./runNondexUnderAuthor.sh <author_repository_url> <path_where_you_want_to_clone_those repos>

With the second parameter in ./runNondex.sh, you can only run Nondex on modules in a certain directory instead of the entire project.

To find the author_repository_url, find the author that you want to run Nondex with, and get this author's repository overview url (e.g., https://github.com/orgs/spotify/repositories). Note that you don't need to provide the url with other parameters, as the script will automatically add the parameters needed.

There are two types of account in the github: personal account and organizational account, and their repo's url is slightly different:

  1. Organizational Account: https://github.com/orgs/HubSpot/repositories
  2. Personal Account: https://github.com/Anuken?tab=repositories

You don't need to worry about the account type that you want to run Nondex with. This script will automatically handle both cases.

Two sample commands for runNondexUnderAuthor:

  1. Organizational Account: ./runNondexUnderAuthor.sh https://github.com/orgs/spotify/repositories ~/progress6
  2. Personal Account: ./runNondexUnderAuthor.sh https://github.com/Anuken?tab=repositories ~/progress6

After running the runNondexUnderAuthor.sh command, you could go to your progress6 directory (the directory you indicate in the command) and run the command below to get an overview of your findings (./progress_stats.md)!

find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && git rev-parse HEAD && git config --get remote.origin.url | rev | cut -c5- | rev && cat .runNondex/htmlOutput && cat report_md.md" \; &> progress_stats.md