ci: fix vcreate_input_test.v on FreeBSD (expect is in /usr/local/bin there, if installed) (#19578)

This commit is contained in:
Delyan Angelov 2023-10-16 10:11:51 +03:00 committed by GitHub
parent 44045c650b
commit 0fb38edcb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 11 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3

View file

@ -16,6 +16,12 @@ const (
expect_tests_path = os.join_path(@VMODROOT, 'cmd', 'tools', 'vcreate', 'tests') expect_tests_path = os.join_path(@VMODROOT, 'cmd', 'tools', 'vcreate', 'tests')
) )
fn testsuite_begin() {
dump(expect_exe)
dump(test_module_path)
dump(expect_tests_path)
}
fn prepare_test_path() ! { fn prepare_test_path() ! {
os.rmdir_all(test_module_path) or {} os.rmdir_all(test_module_path) or {}
os.mkdir_all(test_module_path) or {} os.mkdir_all(test_module_path) or {}
@ -25,7 +31,8 @@ fn prepare_test_path() ! {
fn test_new_with_no_arg_input() { fn test_new_with_no_arg_input() {
prepare_test_path()! prepare_test_path()!
project_name := 'my_project' project_name := 'my_project'
res := os.execute('${os.join_path(expect_tests_path, 'new_with_no_arg.expect')} ${@VMODROOT} ${project_name}') res := os.execute('${os.quoted_path(expect_exe)} ${os.join_path(expect_tests_path,
'new_with_no_arg.expect')} ${@VMODROOT} ${project_name}')
if res.exit_code != 0 { if res.exit_code != 0 {
assert false, res.output assert false, res.output
} }
@ -46,7 +53,8 @@ fn test_new_with_no_arg_input() {
fn test_new_with_name_arg_input() { fn test_new_with_name_arg_input() {
prepare_test_path()! prepare_test_path()!
project_name := 'my_other_project' project_name := 'my_other_project'
res := os.execute('${os.join_path(expect_tests_path, 'new_with_name_arg.expect')} ${@VMODROOT} ${project_name}') res := os.execute('${os.quoted_path(expect_exe)} ${os.join_path(expect_tests_path,
'new_with_name_arg.expect')} ${@VMODROOT} ${project_name}')
if res.exit_code != 0 { if res.exit_code != 0 {
assert false, res.output assert false, res.output
} }
@ -68,7 +76,8 @@ fn test_new_with_model_arg_input() {
prepare_test_path()! prepare_test_path()!
project_name := 'my_lib' project_name := 'my_lib'
model := 'lib' model := 'lib'
res := os.execute('${os.join_path(expect_tests_path, 'new_with_model_arg.expect')} ${@VMODROOT} ${project_name} ${model}') res := os.execute('${os.quoted_path(expect_exe)} ${os.join_path(expect_tests_path,
'new_with_model_arg.expect')} ${@VMODROOT} ${project_name} ${model}')
if res.exit_code != 0 { if res.exit_code != 0 {
assert false, res.output assert false, res.output
} }

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"] set v_root [exec sh -c "git rev-parse --show-toplevel"]

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"] set v_root [exec sh -c "git rev-parse --show-toplevel"]

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"] set v_root [exec sh -c "git rev-parse --show-toplevel"]

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"] set v_root [exec sh -c "git rev-parse --show-toplevel"]

View file

@ -1,4 +1,4 @@
#!/usr/bin/expect #!/usr/bin/env expect
set timeout 3 set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"] set v_root [exec sh -c "git rev-parse --show-toplevel"]