Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunAllGenPkgDemos ¶
func RunGenPkgDemo ¶
runSingleDemo tests a single LLCPPG conversion case in the given demo directory. The testing process includes:
- 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.
- Running LLCPPG to generate the converted package
- Verifying the generated package can be built using llgo
- 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.
Click to show internal directories.
Click to hide internal directories.