301 Days (redux)

Another metric leap year of gamedev experiments and such

Day 53 - Grumpy

Jun 9, 2016 - 2 minute read - OldDaysseitan-spin

Great vengeance and furious anger.

Worked all evening and have very little to show for it.

File handle shenanigans

Yesterday I was somewhat perturbed to find that when:

  1. I was redirecting the test output to a file (cucumber.out), and
  2. The test code needed to spawn the game server, and
  3. The game server was still up when the tests ended, then
  4. I could not replace cucumber.out because the game server still had the file handle.

So I spent a couple of hours trying everything I could to get rid of this behavior. I would think that this:

features/lib/hooks.rb GitLab
    result = Process.spawn("DragSpinExp.exe", [:out, :err]=>["DragSpinExp.log", "w"], :close_others=>true)

where I explicitly reassign stdout and stderr, and specifically indicate that all others should be closed, would do the trick. But:

Thanks, Process Explorer. Thanks, Process Explorer.

So I give up. I’ll just kill the game server at the end of each test and it won’t be an issue.

And the other thing

The more I work on this blog, the slower Jekyll/Octopress gets at generating it. Right now it’s up to 300 seconds (regardless of how little changed), which makes it a bit tough to iterate quickly. So I went to the effort of spinning up a new Linux instance and getting all of the pieces in place, to see if it was something about my current setup (using PortableJekyll on Windows 7). The result? Just as slow, if not slower.

In conclusion

NSFW (language)

More to come

Day 53 code - tests