From 1e3a13548d06361751305c0de6fb4c2dabe528b6 Mon Sep 17 00:00:00 2001 From: Christopher Schuchardt Date: Sun, 7 Jul 2024 03:19:49 -0400 Subject: [PATCH 1/2] Added Debug to Expect --- .github/workflows/main.yml | 10 +++++----- .../Neo.CLI/{test-neo-cli.expect => test-neo-cli.exp} | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) rename scripts/Neo.CLI/{test-neo-cli.expect => test-neo-cli.exp} (93%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5f315dd27..754b879b0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - name: Check Format (*.cs) run: dotnet format --verify-no-changes --verbosity diagnostic - Build-Test-Neo-Cli: + Test-Everything: needs: [Format] timeout-minutes: 15 runs-on: ubuntu-latest @@ -37,16 +37,16 @@ jobs: with: dotnet-version: ${{ env.DOTNET_VERSION }} - - name: Build (Neo.CLI) - run: dotnet build ./src/Neo.CLI --output ./out/Neo.CLI + - name: Build (Everything) + run: dotnet build - name: Install dependencies run: | sudo apt-get install libleveldb-dev expect - find ./out -name 'config.json' | xargs perl -pi -e 's|LevelDBStore|MemoryStore|g' + find ./bin -name 'config.json' | xargs perl -pi -e 's|LevelDBStore|MemoryStore|g' - name: Run tests with expect - run: expect ./scripts/Neo.CLI/test-neo-cli.expect + run: expect ./scripts/Neo.CLI/test-neo-cli.exp Test: needs: [Format] diff --git a/scripts/Neo.CLI/test-neo-cli.expect b/scripts/Neo.CLI/test-neo-cli.exp similarity index 93% rename from scripts/Neo.CLI/test-neo-cli.expect rename to scripts/Neo.CLI/test-neo-cli.exp index 8319c18f8e..e8aec7dcfb 100644 --- a/scripts/Neo.CLI/test-neo-cli.expect +++ b/scripts/Neo.CLI/test-neo-cli.exp @@ -1,12 +1,12 @@ -#!/usr/bin/expect -f +#!/usr/bin/expect -d -f # # This script uses expect to test neo-cli # set timeout 10 - +exp_internal true # Start neo-cli -spawn dotnet out/Neo.CLI/neo-cli.dll +spawn dotnet ./bin/Neo.CLI/net8.0/neo-cli.dll # Expect the main input prompt expect { From 718838dac7127e955acd4580d97a73ce17958156 Mon Sep 17 00:00:00 2001 From: Christopher Schuchardt Date: Sun, 7 Jul 2024 03:27:56 -0400 Subject: [PATCH 2/2] Update file paths --- scripts/Neo.CLI/test-neo-cli.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Neo.CLI/test-neo-cli.exp b/scripts/Neo.CLI/test-neo-cli.exp index e8aec7dcfb..e7124402c3 100644 --- a/scripts/Neo.CLI/test-neo-cli.exp +++ b/scripts/Neo.CLI/test-neo-cli.exp @@ -18,7 +18,7 @@ expect { # # Test 'create wallet' # -send "create wallet test-wallet1.json\n" +send "create wallet ./bin/Neo.CLI/test-wallet1.json\n" expect { "password:" { send "asd\n" } @@ -42,7 +42,7 @@ expect { # # Test 'create wallet' # -send "create wallet test-wallet2.json L2ArHTuiDL4FHu4nfyhamrG8XVYB4QyRbmhj7vD6hFMB5iAMSTf6\n" +send "create wallet ./bin/Neo.CLI/test-wallet2.json L2ArHTuiDL4FHu4nfyhamrG8XVYB4QyRbmhj7vD6hFMB5iAMSTf6\n" expect { "password:" { send "abcd\n" }