301 Days

A year of gamedev experiments.

Day 53 - Grumpy

| Comments

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.rblink
20
    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:

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


Day 53 code - tests

Comments