Skip to content

Commit

Permalink
[Add] Debug Output to Expect (#3407)
Browse files Browse the repository at this point in the history
* Added Debug to Expect

* Update file paths

---------

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 11, 2024
1 parent 1c45832 commit 97e24ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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" }
Expand All @@ -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" }
Expand Down

0 comments on commit 97e24ed

Please sign in to comment.