sanitycheck: reduce number of unnecessary configuration builds

When running a reduced set of tests with --platform-limit or using the
default of 1 we build the configuration (make initconfig) for all
platforms, although we are only interested in a limited set. On my
machine this is 100s of build time for configurations we are never going
to use.
This reduces the number of builds to what we really need and speeds up
sanitycheck runtime overall.

Might need a few more optimisations.

Change-Id: I813fabf1453f19ce7a83b28e4792b5c80616d936
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck
index c31620d..6b274d4 100755
--- a/scripts/sanitycheck
+++ b/scripts/sanitycheck
@@ -1335,7 +1335,7 @@
                     if tc.platform_whitelist and plat.name not in tc.platform_whitelist:
                         continue
 
-                    if tc.tc_filter:
+                    if tc.tc_filter and (plat in arch.platforms[:platform_limit] or all_plats or platform_filter):
                         args = tc.extra_args[:]
                         args.extend(["ARCH=" + plat.arch.name,
                                 "BOARD=" + plat.name, "initconfig"])