auto_hck is a tool for automating HCK/HLK testing, doing all the boilerplate steps in the process leaving you with simply choosing which driver you want to test on what os.
There are not so few steps needed to install and set up auto_hck, First of all clone auto_hck and follow the instruction below:
Use your package manager to install QEMU or build it from source
Clone VirtHCK, auto_hck will use it as a dependency.
Get a copy of the powershel script file in rtoolsHCK
Get a clone of rtoolsHCK, execute the follwing to build and install as a gem:
rake build
rake install
Install the following gems using bundler with bundler install
or gem install gemname
:
- dropbox_api
- faraday (version 0.12.2)
- net-ping
- filelock
- octokit
Use a dhcp server tool like OpenDHCP or Node-DHCP to assign static ip to mac-address with the following rule:
56:00:XX:00:XX:dd > 192.168.0.XX
Filters are fixes for problematic tests, read more at: Microsoft HLK Filters
To run tests with applied filters automatically, get a copy of UpdateFilters.sql
form HCK-CI/hckfilters and place them inside auto_hck at filters/UpdateFilters.sql
.
To run HLK tests with latest Microsoft compatibility playlist clone HLK Playlists inside auto_hck and rename the directory to playlists, once it's there auto_hck will look for the right xml playlist file and apply it to the tests.
To run auto_hck correctly the runnig user should have permission to run sudo commands without prompting his password, do this by adding the following line to sudoers file /etc/sudoers This might be dangerous to your computer security, do this at your own risk
hck-ci ALL=(ALL) NOPASSWD:ALL
This is similar to making regular HLK/HCK studio and clients images with with few additionals configurations, detailed instrutions available at HLK-Setup-Scripts
auto_hck allows integration with Dropbox, automatically uploading results and logs to specific location. to do that you will need to create auth2 token
- go to https://www.dropbox.com/developers/apps and click on 'Create app'
- select 'Dropbox API', 'Full Dropbox' access type and give it a unique name.
- click on 'Generated access token' and copy the token to config.json file.
when specifing a pull request auto_hck can mark test results on github and link to dropbox logs folder. to do that you will need to create a personal access token.
- go to https://github.com/settings/tokens and click on 'Generate new token'
- give it a name, select: repo:status and click 'Generate token'
- copy the token to the config.json file.
There are 3 diffrenet JSON files for configurations, examples included in the files:
config.json
is the general configuration file which holds the paths to the dependencies stated above.platforms.json
list of configured opertaions systems images.devices.json
list of devices drivers information for testing
Once everything is installed and configured, run ruby auto_hck.rb
with these parameters:
Required:
-t, --tag [PROJECT]-[OS][ARCH] The driver name and architecture
-p, --path [PATH-TO-DRIVER] The location of the driver
Optional:
-d, --diff <DIFF-LIST-FILE> Poth to text file containing a list of changed source files
-c, --commit <COMMIT-HASH> Commit hash for updating github status
-D, --debug Printing debug information
ruby auto_hck.rb -t Balloon-Win10x86 -p /home/hck-ci/balloon/win10/x86
ruby auto_hck.rb -t NetKVM-Win10x64 -d /home/hck-ci/workspace -d /path/to/diff.txt
ruby auto_hck.rb -t viostor-Win10x64 -d /home/hck-ci/viostor -d /path/to/diff.txt -c ec3da560827922e5a82486cf19cd9c27e95455a9
- Lior Haim - Development - Daynix Computing LTD