Johnny’s HPCC Blog

Hello everyone and welcome to my intern blog!

Week 1

Week 2

Week 3

Week 4

Week 5

Week 6/7

Week 8

Week 9-10

July 10-14th

This week started off with some bug fixing within CoreScript.sh to address some edge cases where if there were no trace files to collect it would be an error within GitHub Actions. To address this, the last two lines of the script has been changed to this:

Later in the week, I turned my focus to the unittest workflow. Within Smoketest.yml, I made sure that unit testing occurs individually in alphabetical order, the output and timing is captured for every test as well as a zip file where it will contain the log artifacts for each test. 

From the code above:

The script begins by setting up the system’s environment. This involves designating the system language as English (US), updating the system’s locale, and then extracting contents from a compressed file named install.tgz.

Subsequently, preparations for unit testing are initiated. The CoreScript.sh file is copied from the installation directory and given executable permissions. Then, a list of unit tests available within the HPCCSystems binary directory is fetched, sorted, and the total number is counted.

Once set, the script dives into the execution phase. Each test case from the sorted list undergoes execution, with the system recording its start time and enforcing a maximum runtime of 4 minutes. Outputs for individual test cases are redirected to distinct log files. Upon each test’s completion, the exit status is evaluated: successful tests prompt a success message that includes the time taken, while failures result in a corresponding failure message.

After all tests have been run, the script commences the summarization of results. All log files are processed to count the successful tests. By subtracting this count from the total number of tests, failed tests are identified. A brief report is then displayed, sharing details about the total tests executed, the number of successes, and the failures.

In the final steps, all the log files are compressed into a singular zip file named logs.zip for consolidation. This ensures easy access to the results and also serves as a means of housekeeping, as individual log files are deleted after compression. Lastly, the script is executed, its main function being to check for any core files that might have been produced during testing. Such core files are typically indicators of program crashes.


Leave a comment

Design a site like this with WordPress.com
Get started