How to use the command `smalltalkci` (with examples)

How to use the command `smalltalkci` (with examples)

smalltalkci is a command-line tool that allows you to test Smalltalk projects using various continuous integration platforms such as GitHub Actions, Travis CI, AppVeyor, GitLab CI, and others. It provides a simple way to run tests for Smalltalk projects and supports different configurations and testing environments.

Use case 1: Run tests for a configuration file

Code:

smalltalkci path/to/.smalltalk.ston

Motivation: When you have a specific configuration file for your Smalltalk project, you can use this command to run the corresponding tests. By specifying the path to the .smalltalk.ston file, the command will execute the tests defined in the configuration.

Explanation:

  • path/to/.smalltalk.ston: Specifies the path to the .smalltalk.ston configuration file.

Example output: The command will execute the tests defined in the specified configuration file and provide the test results and any error messages.

Use case 2: Run tests for the .smalltalk.ston configuration in the current directory

Code:

smalltalkci

Motivation: If you have a .smalltalk.ston configuration file in your current directory, you can use this command to run the tests defined in that file. This is useful when you want to quickly test your project without specifying the path to the configuration file.

Explanation:

  • No additional arguments are required. The command will automatically look for a .smalltalk.ston file in the current directory and execute the tests defined in it.

Example output: The command will execute the tests defined in the .smalltalk.ston configuration file found in the current directory and provide the test results and any error messages.

Use case 3: Debug tests in headful mode (show VM window)

Code:

smalltalkci --headful

Motivation: Sometimes, it is necessary to debug tests in headful mode, which means showing the virtual machine (VM) window during the test execution. This can be useful for visually inspecting the state of the application or debugging any issues that may occur during the tests.

Explanation:

  • --headful: Enables headful mode, which shows the VM window during the test execution.

Example output: The command will execute the tests in headful mode, and the VM window will be displayed, allowing you to visually inspect the progress and state of the tests.

Use case 4: Download and prepare a well-known Smalltalk image for the tests

Code:

smalltalkci --smalltalk Squeak64-Trunk

Motivation: In some cases, you may need to use a specific Smalltalk image for your tests. This command allows you to download and prepare a well-known Smalltalk image that is compatible with the testing environment.

Explanation:

  • --smalltalk Squeak64-Trunk: Specifies the Smalltalk image to download and prepare for the tests. In this example, the command will download and prepare the Squeak64-Trunk image.

Example output: The command will download and prepare the Squeak64-Trunk Smalltalk image, making it available for the test execution.

Use case 5: Specify a custom Smalltalk image and VM

Code:

smalltalkci --image path/to/Smalltalk.image --vm path/to/vm

Motivation: If you have a custom Smalltalk image and virtual machine (VM) that you want to use for your tests, you can specify them using this command. This is useful when you have a specific image and VM setup that you want to test against.

Explanation:

  • --image path/to/Smalltalk.image: Specifies the path to the custom Smalltalk image to be used for the tests.
  • --vm path/to/vm: Specifies the path to the custom VM to be used for the tests.

Example output: The command will use the custom Smalltalk image and VM specified, executing the tests with the provided setup.

Use case 6: Clean up caches and delete builds

Code:

smalltalkci --clean

Motivation: Over time, test environments can accumulate cache files and build artifacts, which may affect the test execution or use unnecessary disk space. This command allows you to clean up caches and delete previous builds to ensure a clean testing environment.

Explanation:

  • --clean: Initiates the cleanup process, removing caches and build artifacts.

Example output: The command will clean up caches and delete previous builds, freeing disk space and ensuring a clean testing environment. The output will show the progress and status of the cleanup process.

Related Posts

How to use the command `git gh-pages` (with examples)

How to use the command `git gh-pages` (with examples)

The command git gh-pages is part of the git-extras package and is used to create a new branch called gh-pages inside the current Git repository.

Read More
Exploring the Power of the `cf` Command in Cloud Foundry (with examples)

Exploring the Power of the `cf` Command in Cloud Foundry (with examples)

Introduction: Cloud Foundry is a popular open-source platform that provides a cloud-based application runtime environment.

Read More
How to use the command 'luac' (with examples)

How to use the command 'luac' (with examples)

The command ’luac’ is the Lua bytecode compiler. It is used to compile a Lua source file into Lua bytecode.

Read More