[test] add a small test to validate tcl integration

This commit is contained in:
tangxifan 2022-12-02 11:43:46 -08:00
parent f1e39e7748
commit 97c72c73f1
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,12 @@
#!/bin/bash
#set -e
###############################################
# OpenFPGA Shell in Tcl
##############################################
source openfpga.sh
echo -e "Regression tests for OpenFPGA in Tcl Shell";
cd build/openfpga
${OPENFPGA_PATH}/openfpga_flow/scripts/swig_tcl_example.tcl
cd -

4
openfpga_flow/scripts/swig_tcl_example.tcl Normal file → Executable file
View File

@ -1,3 +1,4 @@
#! /bin/env tclsh
# Load dynamic linked library # Load dynamic linked library
load "openfpga_shell.so" openfpga_shell load "openfpga_shell.so" openfpga_shell
# Create a new Openfpga shell # Create a new Openfpga shell
@ -5,4 +6,5 @@ std::OpenfpgaShell openfpga_shell
# Run an command # Run an command
openfpga_shell run_command "help" openfpga_shell run_command "help"
# Finish the quit # Finish the quit
openfpga_shell run_command "exit" #openfpga_shell run_command "exit"
#exit