diff --git a/host/src/main.rs b/host/src/main.rs index fd9de2a..c190b06 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -302,7 +302,13 @@ fn main() -> io::Result<()> { attributes.merge(&existing.1); *existing = (curr_time, attributes); } else { - data.insert(event.tab_info.tab_id, (curr_time, attributes)); + // We some times receive events with null titles and window ids, for which + // we never receive remove events afterwards. Not sure what those are, + // they might be the result of a race condition on the extension side, but + // as a workaround we ignore them here. + if attributes.title.is_some() && attributes.window_id.is_some() { + data.insert(event.tab_info.tab_id, (curr_time, attributes)); + } } } } diff --git a/integration_tests/run_tests.sh b/integration_tests/run_tests.sh index ec2a5f1..02fd76e 100755 --- a/integration_tests/run_tests.sh +++ b/integration_tests/run_tests.sh @@ -102,23 +102,33 @@ function run-suite() { local invocation=( dbus-launch "$VIRTUALENV_DIR"/bin/python3 tabreport_tests.py "$ff_version" "$xpi_file" ) tmpfile= if [ "$REPORT_MD_FILE" != "" ]; then + echo "Outputting to ${REPORT_MD_FILE}" >&2 tmpfile="$(mktemp)" invocation=( "${invocation[@]}" -o "$tmpfile" ) fi + result=0 if [ "$host_target_version" != "" ]; then echo "Running integration tests with Firefox $ff_version and native host version ${host_target_version}" >&2 echo "" >&2 + set +e HOST_TARGET_VERSION="$host_target_version" "${invocation[@]}" + result=$? + set -e else echo "Running integration tests with Firefox $ff_version" >&2 echo "" >&2 + set +e "${invocation[@]}" + result=$? + set -e fi if [ "$REPORT_MD_FILE" != "" ]; then cat "$tmpfile" >> "$REPORT_MD_FILE" fi + + return "$result" } while read -r ff_version; do