> Details: > > I'd been working for a while on fixing this, and got as far as to get `make > check' to run one or two pro forma test cases, but I haven't worked in this > for so long that I should just put this here in case someone else wants to > update it to work with the latest releases. > > The test harness includes a stdin-based client, which can be driven by > expect(1), such as specifically the DejaGNU testing framework does. Some basic > query and action commands exist with input and output formats designed to be > primarily machine-parseable rather than human-friendly (although it's still > just plain text). > > My code is on my Freeciv fork at repo.or.cz, but the server is struggling to > respond to www requests, so finding my fork is left as an exercise to the > reader. Git URL is git://repo.or.cz/freeciv/berndj.git Branches 2.2, 2.3 and > 2.4 should be more or less up-to-date.
My preference would have been, to create a store and replay framework - store messages send to referee(server) - store messages received from referee Same mechanism for testing the referee - store messages send to clients - store messages received from clients We should be able to replay the saved messages, which should be the best debugging tools, allowing replay until you can pin point the miss behaving codes. For the client, the gui part, is supposed to be completely removable. When it is not, a man in the middle, can be put in the gui event loop. Your code is all about catching the gui loop events. - What are we supposed to do with the referee. - catching the opcode generated by common/packets.def file should be a stronger mechanism for testing and debugging here is an example from my codeset for common/packets_gen.c @@ -27610,6 +27618,7 @@ static int send_packet_ruleset_building_100(struct connection *pconn, const stru bool differ, old_from_hash, force_send_of_unchanged = TRUE; struct hash_table **hash = &pconn->phs.sent[PACKET_RULESET_BUILDING]; int different = 0; + printf("PACKET_RULESET_GOVERNMENT:104\n"); SEND_PACKET_START(PACKET_RULESET_BUILDING); if (!*hash) { _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev