I know that there is an init system that can allow programs execution after boot (without login).
Unfortunately these days there is not one init system there is a half dozen popular init systems. For example sysv init, systemd, upstart, etc.
Anyway, if you really want a system to provide you with a console that has root access, you would probably want to update your init system.
I do this for a serial port on a couple of my systems. I have have two very different configurations and I am only using Debian with two different releases. I can't imagine that you will be able to come up with a single method that will apply across all distros. There is just no consistency for how things get started. Systemd should be pretty similar across distros, but it isn't broadly accepted yet.
Debian with sysv init (wheezy) drop to root on serial port
# /etc/inittab
...
# serial port getty spawns sulogin, which drops to a root shell
# on debian if root has a disabled password
T0:23:respawn:/sbin/getty -n -l /sbin/sulogin -L ttyS0 57600 vt102
...
Debian with systemd (jessie) drop to root on serial port
#/etc/systemd/system/getty.target.wants/[email protected]
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
BindsTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
[Service]
ExecStart=-/sbin/agetty -n -l /sbin/sulogin --keep-baud 115200,38400,9600 %I $TERM
Type=idle
Restart=always
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
[Install]
WantedBy=getty.target
Your best bet might be to give up on the idea of logging in as root, and instead use a configuration management tool like puppet or that can abstract away some various distro-release differences for you. Have that tool trigger your test runs.