• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

abs-lang / abs / 402
72%
master: 63%

Build:
Build:
LAST BUILD BRANCH: 2.8.x
DEFAULT BRANCH: master
Ran 18 Feb 2019 06:10AM UTC
Jobs 3
Files 7
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Feb 2019 06:09AM UTC coverage: 73.187% (-0.4%) from 73.564%
402

push

travis-ci-com

odino
Experimental support for background commands, closes #70

This was easier than I though, but it required some changes here
and there.

The `String` object now has an internal mutex, used to keep hold of
the value of the command until it's executed.

What really changed is that:

* regular commands go through "normally"
* background commands are defined as commands that end with `&` (`$(sleep 1 &)`)
* background commands are launched in a goroutine and "locked" with the above mutex
* when the command is over, we set its output and release the mutex
* added the `cmd.wait()` function which will try to acquire the lock on the mutex, thus waiting until the command is done
* added the `.done` property on string to understand whether a command is done or not

Fun things that we can do now:

```
cmd = `sleep 10`
echo("This will be printed in 10s")

cmd = `sleep 10 &`
echo("This will be printed immediately")
sleep(9000)
cmd.done # FALSE
cmd.ok # FALSE
echo("We have been waiting 9s")
cmd.wait()
echo("And approximately another second")
cmd.done # TRUE
cmd.ok # TRUE
```

@ntwrick hat do you think?

98 of 98 new or added lines in 3 files covered. (100.0%)

2462 of 3364 relevant lines covered (73.19%)

78.68 hits per line

Jobs
ID Job ID Ran Files Coverage
1 402.1 (CONTEXT=abs) 18 Feb 2019 06:14AM UTC 0
72.27
Travis Job 402.1
2 402.2 (CONTEXT=abs) 18 Feb 2019 06:10AM UTC 0
73.19
Travis Job 402.2
3 402.3 (CONTEXT=abs) 18 Feb 2019 06:11AM UTC 0
73.19
Travis Job 402.3
Source Files on build 402
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #402
  • 1f52898d on github
  • Prev Build on 1.2.x (#398)
  • Next Build on 1.2.x (#408)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc