demo

package
v0.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAllGenPkgDemos

func RunAllGenPkgDemos(baseDir string, confDir string) error

func RunGenPkgDemo

func RunGenPkgDemo(demoRoot string, confDir string) error

runSingleDemo tests a single LLCPPG conversion case in the given demo directory. The testing process includes:

  1. Reading and validating the llcppg.cfg configuration file if the current OS is not macOS, it will look up the `conf/{OS}/llcppg.cfg` and skip if llcppg.cfg dones't exist.
  2. Running LLCPPG to generate the converted package
  3. Verifying the generated package can be built using llgo
  4. Running example programs in the demo subdirectory that use the generated package

Directory structure (take _llcppgtest/lua as an example): _llcppgtest/lua/ - Demo root directory

	├── llcppg.cfg          - LLCPPG configuration file
 	├── conf         		- Configuration directory for speficied platforms
	|	└── linux			- Linux Platform
	| 	  	└── llcppg.cfg  - LLCPPG configuration file (linux platform)
	├── out/                - Generated package output directory
	└── demo/               - Example programs directory
	    ├── example1/       - First example program
	    └── example2/       - Second example program

The function will panic if any step in the testing process fails.

Parameters:

  • demoRoot: Path to the root directory of a single demo case
  • confDir: Path to the configuration directory relative to demoRoot, defaults to "." if empty

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL