Skip to content

Tinygorush#2634

Merged
rminnich merged 5 commits into
u-root:mainfrom
rminnich:tinygorush
Mar 5, 2023
Merged

Tinygorush#2634
rminnich merged 5 commits into
u-root:mainfrom
rminnich:tinygorush

Conversation

@rminnich
Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
This allows a different runone to be provided for baremetal
environments.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
@rminnich rminnich added the Awaiting reviewer Waiting for a reviewer. label Feb 26, 2023
@rminnich
Copy link
Copy Markdown
Member Author

so here is the POC

this runs the commands without using fork. That means it can work on bare metal environments like tinygo and tamago

It has a very simple problem:
/tmp/tiny3283520552/builder407189277/src/bb.u-root.com/bb/bb rush
% date
2023/02/26 00:46:00 run /usr/bin/date
Sun Feb 26 00:46:00 UTC 2023
% rush
2023/02/26 00:46:03 run rush
% date
2023/02/26 00:46:05 run /usr/bin/date
/tmp/tiny3283520552/builder407189277/src/bb.u-root.com/bb/bb flag redefined: u
panic: /tmp/tiny3283520552/builder407189277/src/bb.u-root.com/bb/bb flag redefined: u

because of globals :-)

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
@rminnich
Copy link
Copy Markdown
Member Author

ok, with the latest
% date
2023/02/26 01:03:15 run /usr/bin/date
Sun Feb 26 01:03:15 UTC 2023
% date
2023/02/26 01:03:16 run /usr/bin/date
Sun Feb 26 01:03:16 UTC 2023
% date
2023/02/26 01:03:17 run /usr/bin/date
Sun Feb 26 01:03:17 UTC 2023
% date
2023/02/26 01:03:17 run /usr/bin/date
Sun Feb 26 01:03:17 UTC 2023
%

no more problems with flag.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 26, 2023

Codecov Report

Patch coverage: 11.11% and project coverage change: -0.01 ⚠️

Comparison is base (5b46c23) 74.71% compared to head (24837df) 74.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2634      +/-   ##
==========================================
- Coverage   74.71%   74.70%   -0.01%     
==========================================
  Files         412      413       +1     
  Lines       41651    41653       +2     
==========================================
  Hits        31118    31118              
- Misses      10533    10535       +2     
Impacted Files Coverage Δ
cmds/exp/rush/runone_unix.go 0.00% <0.00%> (ø)
cmds/exp/rush/rush.go 57.27% <50.00%> (+2.49%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment thread tools/tinygobb/main.go Outdated
@binjip978
Copy link
Copy Markdown
Contributor

Otherwise it works for me:

root@epiphyte:/tmp/tiny588138646/builder4051922320/src/bb.u-root.com/bb# ./bb rush
% date
2023/02/26 09:51:22 run /usr/bin/date
Sun Feb 26 09:51:22 UTC 2023

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
@rminnich rminnich merged commit 285668a into u-root:main Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting reviewer Waiting for a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants