mob icon indicating copy to clipboard operation
mob copied to clipboard

create-testbed does not work (on Windows)

Open MrGung opened this issue 3 years ago • 8 comments

Setting up the project locally I've tried go test in Powershell:

> go test
./create-testbed C:\Users\Steffen\AppData\Local\Temp\TestStartDoneCoAuthors2988483707\001

exec: "./create-testbed": file does not exist
exit status 1
FAIL    github.com/remotemobprogramming/mob/v3  0.350s

I then switched to git-bash, getting:

$ go test
./create-testbed C:\Users\Steffen\AppData\Local\Temp\TestStartDoneCoAuthors2249576695\001

exec: "./create-testbed": file does not exist
exit status 1
FAIL    github.com/remotemobprogramming/mob/v3  0.319s

The directory mentioned in the run of git-bash exists, though.

MrGung avatar May 15 '22 05:05 MrGung

Can you run the testbed script manually?

simonharrer avatar May 15 '22 14:05 simonharrer

Would you like me to set up a CI build on Windows @simonharrer so we can try to get ahead of these?

seanpoulter avatar May 15 '22 14:05 seanpoulter

@seanpoulter yeah, having the tests in the CI pipeline also run on windows would be great. Go ahead. Reach out if you need any credentials to try it out.

simonharrer avatar May 15 '22 19:05 simonharrer

I took the cmdline printed to console and executed it manually in git bash:

$ ./create-testbed C:\Users\Steffen\AppData\Local\Temp\TestStartDoneCoAuthors1861818797\001

Creating temporary test assets in C:UsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001
create remote repo

cleanrepo: Delete C:UsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001/remote

createremoterepo: Creating remote repository C:UsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001/remote
Initialized empty Git repository in C:/Users/Steffen/Documents/Steffen/DEV/clojure/one-offs/mob/CUsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001/remote/
create first local repo

cleanrepo: Delete C:UsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001/local

clonerepo: Cloning remote C:UsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001/remote to C:UsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001/local
Cloning into '.'...
fatal: 'C:UsersSteffenAppDataLocalTempTestStartDoneCoAuthors1861818797001/remote' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I Then switched slashes:

$ ./create-testbed C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001

Creating temporary test assets in C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001
create remote repo

cleanrepo: Delete C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote

createremoterepo: Creating remote repository C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote
Initialized empty Git repository in C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote/
create first local repo

cleanrepo: Delete C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/local

clonerepo: Cloning remote C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote to C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/local
Cloning into '.'...
warning: You appear to have cloned an empty repository.
Populating and initial import pushing
Switched to a new branch 'master'
[master (root-commit) a731f65] initial import
 2 files changed, 2 insertions(+)
 create mode 100644 subdir/subdir.txt
 create mode 100644 test.txt
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (5/5), 308 bytes | 154.00 KiB/s, done.
Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
To file://C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote
 * [new branch]      master -> master
branch 'master' set up to track 'origin/master'.
Creating more local repos

cleanrepo: Delete C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/localother

clonerepo: Cloning remote C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote to C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/localother
Cloning into '.'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (5/5), done.
Created local repo localother

cleanrepo: Delete C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/alice

clonerepo: Cloning remote C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote to C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/alice
Cloning into '.'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (5/5), done.
Created local repo alice

cleanrepo: Delete C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/bob

clonerepo: Cloning remote C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/remote to C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/bob
Cloning into '.'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (5/5), done.
Created local repo bob
Creating non-git dirs
Created non-git dir C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/local
Created non-git dir C:/Users/Steffen/AppData/Local/Temp/TestStartDoneCoAuthors1861818797/001/notgit
Done.

Before calling run(t, "./create-testbed", tempDir) - shouldn't there be an output via say("Creating testbed in temporary directory " + tempDir)?

MrGung avatar May 19 '22 05:05 MrGung

Frel free to add this additional say.

simonharrer avatar May 19 '22 05:05 simonharrer

It's there - it just doesn't print.

MrGung avatar May 19 '22 09:05 MrGung

Any way we can fix this script, so it'll work on both unix and windows systems? Replacing backslashes with normal slashes at the start of the shellscript?

simonharrer avatar May 24 '22 08:05 simonharrer

Thought about converting it to Go... :-)

MrGung avatar May 24 '22 09:05 MrGung

So the Goal is to rewrite the Testbed in Go, so that it can be run on all OS

gregorriegler avatar Oct 03 '22 16:10 gregorriegler

The testbed is converted to go and therefore should run on windows now

hollesse avatar Mar 09 '23 19:03 hollesse