Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Add] Debug Output to Expect #3407

Merged
merged 5 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading