Using Riviera-PRO in Batch mode using Jenkins Software for Linux

Introduction

This app note provides information on how to use Riviera-PRO in batch mode using Jenkins tool for Linux. To understand the whole process, we will go through the explanation of all the important segments. To get started, let us understand the tool Jenkins first.

Jenkins-Riviera-PRO Regression Testing:

We will go step-by-step to understand the execution of the Riviera-PRO example using Jenkins.

  1. Jenkins

    • Upon entering the username and password you will be directed to the user home screen.

      Figure 2: Welcome to Jenkins

  2. Jenkins Management

    • To manage Jenkins, click on the Manage Jenkins option from the left-hand menu side. By doing so, users can get various configuration options for Jenkins.

      Figure 3: Manage Jenkins

    • Configure System

      This is where one can manage paths to the various tools to use in builds, such as the JDKs, the versions of Ant and Maven, as well as security options, email servers and other system-wide configuration details. Jenkins adds the required configuration fields dynamically after the plugins are installed.

    • Manage Plugins

      Adds, removes or disables/enables plugins that extends the functionality of Jenkins.

    • Reload Configuration from Disk

      Jenkins stores all its system and build job configuration details as XML files which is stored in the Jenkins home directory. The build history is also stored in the Jenkins home directory. If you migrate build jobs from one Jenkins instance to another, or archiving old building jobs, you will need to add or remove the corresponding build job directories to Jenkins's builds directory. One can simply use the "Reload Configuration from Disk" option to reload the Jenkins system and build job configurations directly.

    • System Information

      This screen displays a list of all the current Java system properties and system environment variables. Here once can check exactly what version of Java Jenkins is running under and all.

    • System Log

      It is a convenient way to view the Jenkins log files in real time. It is used for troubleshooting.

    • Load Statistics

      It displays graphical data on how busy the Jenkins instance is in terms of the number of concurrent builds and the length of the build queue which gives an idea of how long your builds needs to wait before being executed and all. These statistics can give a good idea of whether extra capacity or extra build nodes are required from an infrastructure perspective.

    • Prepare for Shutdown

      If there is a need to shutdown Jenkins, or the server Jenkins is running on, it is best not to do so when a build is being executed. To shut down Jenkins cleanly, user can use the Prepare for Shutdown link, which prevents any new builds from being started.

    • Click on New Item on the left-hand side of Dashboard.

      Figure 4: New Item

    • Click Freestyle project.

    • Click Ok.

    • Once the item name has been finalized, the configuration window opens up as shown below.

      Figure 5: Item Configuration

    • Inside, the configuration window, click Build Triggers tab.

    • Jenkins provides the build step through which it runs tests. It provides different support levels inside build step so that user can go through one convenient to them. Different steps are: Execute Windows batch command, Execute Shell, and Invoke top-level Maven targets. In our case, because we are using the Linux to invoke Riviera-PRO, we will choose the option "Execute Shell". As soon as we select it, the following window opens.

      Figure 6: Build Window

    • Inside the command window, we call the setenv file to set the environment variable of Riviera-PRO.

    • Next, we provide the command "sh" to execute the vsimsa file.

      • sh ./vsimsa -do /edatools/Aldec/Riviera-PRO-2020.10-x64/examples/coverage/coverage_database/keyboard_controller/src/runme.do

    • Below are the script commands that would be executed when the build occurs.

      Figure 7: Script Commands

    • Next, click Save.

    • Click Build Now.

    • Under Build History, click on the most recent build. It will invoke the batch mode tool and execute the script. Inside Jenkins, if your build is successful, you shall see following Console log and the following Riviera-PRO console log.

      Figure 8: Console Output

      Figure 9: Riviera-PRO Script Execution

    • Go to your home directory where the script is stored. The simulation database will be stored there.

      Note: If you want the html files to be created for the coverage results, you can include its commands in the script that you execute.

      Figure 10: Cumulative Coverage Results

      Figure 11: Test 1 Results

      Figure 12: Test 2 Results

Advantages of Jenkins

Disclaimer:

Many of the text in this application note were extracted from the referenced sources (Jenkins.com) regarding the open-source tools they provide. The intention of this application note is to consolidate and organize the data and present a simplified tool flow for the benefit of Aldec users.



Printed version of site: www.aldec.com/en/support/resources/documentation/articles/2131