[autotest] Enforce control file when creating a "standard" test.

Control file will only be enforced on creating non-suite
and non-parameterized jobs.

BUG=chromium:394989
TEST=ran afe
DEPLOY=apache

Change-Id: I6e263c5de77be832db13a5032312a9f4204af391
Reviewed-on: https://chromium-review.googlesource.com/209161
Tested-by: Jiaxi Luo <jiaxiluo@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Jiaxi Luo <jiaxiluo@chromium.org>
diff --git a/frontend/afe/rpc_interface.py b/frontend/afe/rpc_interface.py
index b2bb62f..3d7cade 100644
--- a/frontend/afe/rpc_interface.py
+++ b/frontend/afe/rpc_interface.py
@@ -516,6 +516,9 @@
     @returns The created Job id number.
     """
     control_file = rpc_utils.encode_ascii(control_file)
+    if not control_file:
+        raise model_logic.ValidationError({
+                'control_file' : "Control file cannot be empty"})
 
     if image and hostless:
         return site_rpc_interface.create_suite_job(